2010/4/19 Andrei Pelinescu-Onciul andrei@iptel.org:
Try pkg_available() or shm_available(). Note however that this information is not always available (depends on the compilations options). When not available, they will always return max. ulong ( (unsigned long)-1).
You might want to look also at pkg_info(&mi) and shm_info(&mi). They fill a struct mem_info (defined in mem/meminfo.h):
struct mem_info{ unsigned long total_size; unsigned long free; unsigned long used; unsigned long real_used; /*used + overhead*/ unsigned long max_used; unsigned long min_frag; unsigned long total_frags; /* total fragment no */ };
Thanks a lot.