[sr-dev] A script function to get the reamining PKG MEM
Iñaki Baz Castillo
ibc at aliax.net
Mon Apr 19 10:01:27 CEST 2010
2010/4/19 Andrei Pelinescu-Onciul <andrei at 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.
--
Iñaki Baz Castillo
<ibc at aliax.net>
More information about the sr-dev
mailing list