Mail Archives: djgpp/1997/11/17/18:45:56
On Sun, Nov 16, 1997 7:21 PM, Nate Eldredge <mailto:eldredge AT ap DOT net> wrote:
>This may be misleading, since the amount of memory remaining may be much
>greater than the largest available block. (You might get a value of
`10000',
>but be able to `malloc(5000)' many many times.) Also, it isn't even the
>largest amount you can `malloc()', because of `malloc()'s overhead. So you
>can use that function if you want, but IMHO, the only thing that has any
>meaning is whether or not `malloc()' returns NULL.
>
>Nate Eldredge
>eldredge AT ap DOT net
>
>
Yes, of course, the dpmi memory info should not be an excuse for not
checking whether malloc() returns NULL, but, if you wanted to tell the
user: "Estimated Memory Availble: xxxx" or some such thing, it is rather
useful.
Besides that, I haven't seen any other routines that would yeild a more
accurate value.
_____________________________________________________________________
Seth Hill | ferris AT proaxis DOT com
Troposphere Software | http://www.proaxis.com/~ferris/software/
"What are we going to do tomorrow night, Brain?"
"The same thing we do every night, Pinky - Try to take over the world!
- Raw text -