System call to get current process memory usage?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

System call to get current process memory usage?

Matt England

What if any system calls exist to get the current process' system memory
usage (including all of the current process' threads)?

I'm trying to write unit tests to make sure that my memory allocation
processes (for Boost "smart pointers) are actually deallocating correctly
after thousands of dynamic allocations...and my presumption is that a
process-memory "self check" thoughout this process will be very useful for
my self-running unit test.

I'd prefer cross-platform calls (be it POSIX, unix/linux, Boost C++,
etc...preferably not win32-specific if I can avoid it, but if I must I
will) if I can get them, but I'll take a system specific all (for my
testing prototype) if I must.

Thanks for any help,
-Matt

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: System call to get current process memory usage?

Matt England
Does anyone have thoughts on the problem below?

This newsgroup thread:

<http://groups.google.com/group/comp.unix.programmer/browse_frm/thread/30d4ba4368911673/564a8504c1b70295?tvc=1&q=system-api+to+get+current+process+memory+usage#564a8504c1b70295>

discusses some of this.  It also makes reference to:

<http://www.gnu.org/software/libc/manual/html_node/Statistics-of-Malloc.html>

...for malloc() stats.

Does Boost provide anything like this?

-Matt


At 3/15/2006 06:26 PM, Matt England wrote:

>What if any system calls exist to get the current process' system memory
>usage (including all of the current process' threads)?
>
>I'm trying to write unit tests to make sure that my memory allocation
>processes (for Boost "smart pointers) are actually deallocating correctly
>after thousands of dynamic allocations...and my presumption is that a
>process-memory "self check" thoughout this process will be very useful for
>my self-running unit test.
>
>I'd prefer cross-platform calls (be it POSIX, unix/linux, Boost C++,
>etc...preferably not win32-specific if I can avoid it, but if I must I
>will) if I can get them, but I'll take a system specific all (for my
>testing prototype) if I must.
>
>Thanks for any help,
>-Matt

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users