Mail Archives: djgpp/1997/03/12/01:47:29
On 11 Mar 1997, G.P. Tootell wrote:
> on startup the program claims (under pure dos) that it has 0.7meg real and 121meg
> virtual memory available.
What kind of system setup do you use? If you have 8 or 16MB of RAM, how
come DJGPP only sees 0.7MB free? Did you install a huge disk cache
and/or RAM disk?
> now i get 7.1meg real and 120meg virtual available. this should be enough to
> allocate the 14meg buffer that i require though.
> dpmi_free_memory, or whatever the hugely long name for it is, says it has
> 127.1meg total therefore. but malloc returns a null pointer when i try to dim the
> block. why on earth should this be the case?
That's because the value returned by `_go32_dpmi_remaining_virtual_memory'
*includes* the free physical memory. When you add the two, you get
larger amount than what you actually have, so `malloc' fails.
- Raw text -