www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/01/29/16:52:25

From: dodger AT gcr DOT com (Roger Labbe)
Subject: Q: go32 paging and memory management
To: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp list)
Date: Sun, 29 Jan 1995 15:25:14 -0500 (EST)

Where would I find information about how go32 and djgpp handles memory
management (besides reading the source code). I need to know how they
handle paging and reclaiming data after `delete'.


If you want the specifics, I am developing branch-and-bound algorithms
that dynamically generate search trees with a few hundred thousand
(and up) nodes. These algorithms traverse the tree deeply, so they are
typically working with recently created nodes. They are written in
DJGPP C++. I'm running on a 486SX with 4MB.

When I start a program, it runs w/o accessing the disk until it runs
out of regular memory. From then on, the disk light is on nearly
continuously, and the performance drops dramatically.

I haven't instrumented my code yet (its on the to do list), but if
go32 is paging least frequently used data to disk my intuition tells
me I should be seeing less disk activity. If go32 allocates the data
in real memory until it runs out and then all subsequent data gets
created on, and remains in, virtual memory on the disk, then the
behavior of my code makes sense to me.

Finally, if I am able to delete nodes in the tree partway through the
generation process, and the nodes exist in real memory, can I expect
nodes created after the deletion to be created in real memory or in
virtual memory (assuming real memory was full before the delete)?


Of course all this information is too much for anyone to respond to in
detail, but I included it in case anyone has a good reference to point
me to on these issues. My ultimate goal is not so much to optimize my
code for go32 and djgpp, but to understand test different
implementations based on knowledge of a particular implementation.

Roger Labbe


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019