Mail Archives: djgpp/1996/10/20/02:09:30
On Thu, 17 Oct 1996, Jon Slaughter wrote:
> I'm working on a small program that loads a elevation map and scales it
> down... original is 18 megs, I have 20. When it gets amost half way it
> starts working the disk and becomes about 10000 times slower :( I'm
> assuming that this is because of virtual memory... but is it supose to
Check out the method your program uses to allocate memory. If it
allocates all the 18 MB at once, the DJGPP library allocation functions
round that up to the next power of 2, which means you ask for 32 MB. If
you can change the program so it asks for smaller chunks of memory, your
program might stop paging.
- Raw text -