Mail Archives: djgpp/2004/03/03/05:00:09
>Is there a FAQ about malloc/free performance? I'm having speed problems
>when freeing a large number of small blocks (where large == a million or so,
>and small == 48 bytes).
>
>I have an AMD Duron 900MHz, 384k RAM, Win98SE; DJGPP 2.03, gcc 3.3.2;
>go32-v2 shows 258901k mem/30659k swap available. On this machine, a sample
>set of about 400,000 blocks takes about two minutes to free. The same
>program on a less powerful machine running FreeBSD (4.3R, P3-450, 128k, gcc
>2.95.3) takes 3.5 seconds.
Goto www.delorie.com and search the archives and you will find allot
of discussions in the djgpp_workers list about malloc over the years.
If you spend the time looking I am 98% confident you will find the
answer.
BTW LIBC is where the malloc/free code is and as such it is dependent
on the version of DJGPP you have. Did you try the 2.04 alpha release
to see if it improves things? (I think it will, not to the same degree
as FreeBSD does).
Andrew
- Raw text -