Mail Archives: djgpp/1997/03/12/06:26:22
|> > 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?
nope i didn't do anything. it's someone else's machine :( i think the word is 'a
crap system' :) i tested on a 486dx66 and a p90 (the former with 8 meg the latter
with 16 meg) but i don't have the option to fiddle with their boot files and get
more memory, and besides i couldn't get 14meg out of an 8 meg machine :)
|> > 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.
erk!! this isn't in the clib references, nor the faq methinks. or is it hiding
under some other heading maybe. i was under the impression this was the virtual
only and didn't include the physical memory. having said that, i should still
have 120meg however, so it doesn't actually explain why the malloc failed ;(
regards
nik
--
- Raw text -