> How do i get the amount of memory left for an application to allocate? We
> have an application that badly needs redesign because the current design
[quoted text clipped - 11 lines]
> Any help on how to figure out how much memory is left for a process to use
> would be greatly appreciated.
http://msdn2.microsoft.com/en-us/library/aa366589.aspx
http://msdn2.microsoft.com/en-us/library/aa366781.aspx
Leon Lambert - 07 Sep 2007 11:10 GMT
>> How do i get the amount of memory left for an application to allocate? We
>> have an application that badly needs redesign because the current design
[quoted text clipped - 14 lines]
> http://msdn2.microsoft.com/en-us/library/aa366589.aspx
> http://msdn2.microsoft.com/en-us/library/aa366781.aspx
Thanks this seems perfect.
Leon Lambert
> How do i get the amount of memory left for an application to allocate? We
> have an application that badly needs redesign because the current design
[quoted text clipped - 11 lines]
> Any help on how to figure out how much memory is left for a process to use
> would be greatly appreciated.
Realize that "bytes free" is nowhere near as important as the number and
sizes of free fragments on the heap.
If possible, can you allocate a decent-sized buffer for each operation, use
pieces of that buffer for the various temporary variables the operation
needs, and then free the whole thing when the operation finishes? Then you
will decrease fragmentation a lot, and also there's only one allocation that
can fail.
> Leon Lambert
Leon Lambert - 07 Sep 2007 11:17 GMT
>> How do i get the amount of memory left for an application to allocate? We
>> have an application that badly needs redesign because the current design
[quoted text clipped - 22 lines]
>
>> Leon Lambert
I am not trying to get to be able to allocate the last bit of memory
available. I want a gross way of determining when a particular operation
is going crazy allocating memory. For example let say that 2 gig is the
maximum allocatable memory in the process. I would like to know when an
operation is getting within 300 or 400 megabytes of that maximum. This
leaves me plenty of space to do a clean abort. It would seem that link
that Larry provided will yield the information I need. Thanks for taking
the time to respond.
Leon Lambert