Mail Archives: djgpp/1995/08/15/10:38:49
I have written a text editor AAEMACS in djgpp C++. As it alters lines of the
text it calls `new' and `delete' a lot (particularly on objects of type `class
line' (info re a line of the text being edited) and of type `char[]' (the text
of a line)). I have looked through the source form of malloc() etc and I now
thus know something of how djgpp's heap handling system works. After I have
been editing a big file for a while with AAEMACS, the unmistakable symptoms of
virtual store "store thrashing" start: very slow operation and long stalls
accompanied by much hard disk noise. I am fairly sure that my program is not
affected by major "memory leaks" (i.e. store got by `new' being lost sight of
rather than properly `delete''d).
I realize that the cause is likely that virtual store is handled in `pages'
of fixed length, and that likely the heap gets to contain a random mixture of
pieces of allocated live store and pieces of freed store which haven't been
reallocated yet.
Is this a common occurrence? How big are the `pages'? How do other users
tend to solve this problem?
--------------------------------------------
P.S. Two non-C computer queries:-
(1) Please what is the solvent used in `cleaning floppies'? (These are
floppies with absorbent stuff instead of magnetic, for cleaning the disk
reader heads with.)
(2) Please: does anyone out these know an FTP or WWW site with on-line
information about the `nuclides' (i.e. nuclear properties of the isotopes of
the chemical elements)?
- Raw text -