CompuServe Messages

#Heap Expander

    26-Mar-90 14:27:51
Sb: #24512-#Heap Expander
Fm: Tom Hiscox 72106,3307
To: Slim Heilpern 73727,1170
I have used the Heap Expander on a moderately large C program which is a flat file database manager and would recommend the product to you. IN my application, I use the expanded/extended/virtual memory to hold record which are pointed to from the regular heap (ie from a linked list). This has worked well. Several caveats: Each allocation from heap expander also uses 10 bytes from the regular heap, so allocating lots of small blocks will use up your regular heap. The second comment is not really a problem with heap expander, but just to add that you must keep very clear in your mind whether you're referenceing the object or a pointer to the object. Before using stored data in heap expander, you must dereference the pointer. Installing the heap expander in your program is a great way to thoroughly understand pointers in C ! I have not encountered any bugs in the code. By the way the source is distributed but I have not done much with it other than browse it. Tom Hiscox