Mail Archives: djgpp/2002/03/13/12:07:15
> From: "Giovanni Spagnuolo" <spanish AT ieee DOT org>
> Newsgroups: comp.os.msdos.djgpp
> Date: Wed, 13 Mar 2002 12:21:51 +0000 (UTC)
>
> As you can see, there are no memory bugs, but the maximum available
> memory is about 163MB, while I have 256MB of RAM installed.
As Hans-Bernhard told you, the real amount of memory might be more
than what is handed to your application, since there's an overhead
associated with each allocation.
I'd suggest to begin with running the `go32-v2.exe' program in the
same DOS box. It will show how much memory does Windows let you use
in that DOS box. I'd expect to see 2 numbers whose sum is something
close to 256MB.
Next, call `sbrk(0)' immediately when you start the program, and then
again when it allocates all the memory, and compute the difference
between the two values. This will tell you how much memory did the
program request from Windows, including any overhead required by
internal heap management code.
If that doesn't give a clue, post the information here.
- Raw text -