Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!think.com!snorkelwacker.mit.edu!stanford.edu!rutgers!cmcl2!adm!news From: CDCKAB%EMUVM1.BITNET@cunyvm.cuny.edu ( Karl Brendel) Newsgroups: comp.lang.pascal Subject: Re: Defragmenting the heap in TP 5.5 Message-ID: <27116@adm.brl.mil> Date: 4 Jun 91 23:03:48 GMT Sender: news@adm.brl.mil Lines: 48 In article <9106040138.AA07202@lux.sait.edu.au>, et891856@lux.sait.edu.au (Anthony Nuttall) wrote: >I'm in the middle of writing a text windowing unit which uses the >heap to store overlayed parts of the screen and i'm running into >problems with heap overflow. A little investigating with >breakpoints shows the memavail variable staying pretty constant but >the maxavail variable dropping all the time, even though the heap >memory allocated is released later on. > >This kind of points to fragmentation of the heap, my question is : >Is there anyway of defragmenting the heap so my unit doesn't crash ? I'd suggest that you obtain version 6 or a replacement for the heap manager. It may not solve all of your problems--but then again, it might. :) I saw a presentation on the TEGL graphics library's virtual memory manager. I believe it is included in their shareware evaluation package, but not available as a separate product. It might solve this and other problems. I see the C version of TEGL listed at SIMTEL: "PD1:","","TEGLC.ZIP",1,346112,8,901031,"Graphical windowing toolkit demo (TC/MSC)" TEGL Systems Corp can be contacted at Suite 780, 789 West Pender Street, Vancouver, BC, Canada V6C 1H2. Phone +xx 604 669 2577, FAX +xx 604 688 9530. (xx meaning "I dunno".) Standard disclaimers, of course. >"Baldrick, go forth into the streets and announce that Lord > BlackAdder wishes to sell his house. Percy, just go forth into the > streets" >Edmund BlackAdder , "Money", BlackAdder II Drop me some email telling me a bit about BlackAdder, if you would, please. Cheers-- --Karl +====================================================================+ | Karl Brendel Centers for Disease Control | | Internet: CDCKAB@EMUVM1.BITNET Epidemiology Program Office | | Bitnet: CDCKAB@EMUVM1 Atlanta GA 30093 USA | | Home of Epi Info 5.0 | +====================================================================+