From: "John S. Fine" Newsgroups: comp.os.msdos.djgpp Subject: Re: Djgpp doesn't free the memory? What am I doing wrong? Date: Sun, 29 Nov 1998 14:05:03 -0500 Lines: 52 Message-ID: <36619ADF.7EB5@erols.com> References: <36594f0d DOT 209084 AT news DOT jet DOT es> <365F0263 DOT 27D0 AT erols DOT com> <365fdc75 DOT 11836619 AT news DOT jet DOT es> <36606410 DOT 351A AT erols DOT com> <366132cd DOT 4602741 AT news DOT jet DOT es> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: b0HyGUE6tqk//nUjBVGQbNohCs6ovseb4i8p415fG0c= X-Complaints-To: abuse AT rcn DOT com NNTP-Posting-Date: 29 Nov 1998 19:06:01 GMT X-Mailer: Mozilla 3.01 (Win95; U) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Grzegorz Adam Hankiewicz wrote: > Huh, quite horrible IMHO. I don't have the sources of libc, could you > please tell me how are these chunk "limits" from a size of 10K to 1 > Mb? Above 4K, the boundary sizes are each a power of two plus 4092. In other words the range ((1< >a free-source malloc.c in lgp271s.zip. I simply included that malloc.c > >in the gcc command to build your program and the result worked > >perfectly. > > Could you tell me exactly what files do I have to link with the > source? Oh, and I believe I will also need the C++ compiler, right? I don't have the C++ compiler, so you must not need it. > Since Allegro uses Djgpp's malloc's, do you know how could I make the > lib to use the other malloc instead? This malloc is fully compatible with the rest of libc. You don't need anything other than the malloc.c. If you include the malloc.c in your gcc command it will be used in place of the malloc in libc. If you are using an explicit ld command you can put the malloc.o before libc and get the same result. I am sure it is possible to replace the malloc.o inside libc.a with the new one. If you do it that way, you would have the new one all the time without changing your gcc or ld commands. I don't happen to know how to use (or even the name of) the program that manipulates .a files, but I am sure it is documented. -- http://www.erols.com/johnfine/ http://www.geocities.com/SiliconValley/Peaks/8600/