Leon Breedt wrote:

> how can i see how much memory is available to my program?

This isn't a meaningful question on a proper OS (i.e. something beyond
DOS). There could be hundreds of megabytes of virtual memory
available. If you allocate substantially more virtual memory to a
single process than there is real memory, memory access drops to the
speed of the hard drive, and the system grinds to a halt.

> i want to use this so i can see if all my routines using pointers
> clean up properly after themselves.

If you want to know how much virtual memory has been allocated to a
process, I think that you will need to dig around in the process'
/proc/<pid> directory.

Note that malloc() can allocate non-contiguous chunks of memory using
anonymous mmap(), as well as by using brk().

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to