MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _memory_threshold_ok

Function _memory_threshold_ok

components/lwp/lwp_user_mm.c:423–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423rt_inline rt_bool_t _memory_threshold_ok(void)
424{
425 #define GUARDIAN_BITS (10)
426 size_t total, free;
427
428 rt_page_get_info(&total, &free);
429 if (free * (0x1000) < 0x100000)
430 {
431 LOG_I("%s: low of system memory", __func__);
432 return RT_FALSE;
433 }
434
435 return RT_TRUE;
436}
437
438rt_inline long _uflag_to_kernel(long flag)
439{

Callers 1

lwp_mmap2Function · 0.85

Calls 1

rt_page_get_infoFunction · 0.85

Tested by

no test coverage detected