Mail Archives: djgpp/1998/11/29/14:36:44
Grzegorz Adam Hankiewicz wrote:
> Anyway, I have coded a small example where the program first allocates
> a 25 meg memory chunk, and the 1 meg chunks until the whole ram is
> consumed.
>
> Then, it tries to allocate a 5 meg chunk. If he cannot, he goes
> through the list freeing the pointers. The 25 meg chunk is the first
> on the list.
>
> But, the example ends and it cannot allocate the 5 meg chunk, because
> the pointers are not freed.
Did you figure it out, or did anyone answer by private email?
I have been waiting to see an answer in the newsgroup and
haven't seen one.
There must be an expert here who knows what is going on, but
I sure don't. Your code looks correct and on my machine it
fails as you described.
I doubt there is a bug that serious in malloc and no one has
mentioned it before, but I can't think of any other explanation.
What version of the lib*.a files are you using? (When I
figure out which version *I* am using, I may look at the
malloc source code for clues. I reinstalled djgpp a
couple times and lost track of what comes from where).
--
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/
- Raw text -