mmu: add k_mem_free_get()
Return the amount of physical anonymous memory remaining.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
diff --git a/include/sys/mem_manage.h b/include/sys/mem_manage.h
index ee93f87..8de12e2 100644
--- a/include/sys/mem_manage.h
+++ b/include/sys/mem_manage.h
@@ -139,6 +139,19 @@
#define K_MEM_MAP_GUARD BIT(18)
/**
+ * Return the amount of free memory available
+ *
+ * The returned value will reflect how many free RAM page frames are available.
+ * If demand paging is enabled, it may still be possible to allocate more.
+ *
+ * The information reported by this function may go stale immediately if
+ * concurrent memory mappings or page-ins take place.
+ *
+ * @return Free physical RAM, in bytes
+ */
+size_t k_mem_free_get(void);
+
+/**
* Map anonymous memory into Zephyr's address space
*
* This function effectively increases the data space available to Zephyr.