Mark asks:
> Stan Sieler writes:
> > Well, I can't tell you (yet :) how much heap you've malloc'd, I can tell you:
> >
> > <plug>
> >
> > - how much heap you have in MEMORY at this time
>
> Do you know which fields of which internal process tables this info comes from?
There is no single field. I go to the PIBX and get the HEAP_BASE (the
virtual address of the base of the NM heap), then use
get_object_attribute to determine the upper limit of the heap,
and then simply :) count the number of pages in memory that belong
to that virtual address range.
> While this metric would certainly be handy to know, it might not be enough to
> confirm a memory leak because if the leaked heap space is never referenced, it
> won't be paged into memory and thus won't show up in the metric.
True...which is why I'll try to figure out how to safely get the
amount free (from malloc's viewpoint) someday ... when time permits (which
won't be soon, unfortunately).
--
Stan Sieler [log in to unmask]http://www.allegro.com/sieler.html