[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Special purpose malloc() in KDE?
From:       Petter Reinholdtsen <pere () hungry ! com>
Date:       2001-03-24 18:09:21
[Download RAW message or body]


The last few days, I've been checking the perforance of GNU malloc
(glibc v2.1.3 in Debian 2.2), and was shocked to discover how bad it
behaved in our application.  The memory usage was almost stable on ~2
MB, bu the process size was increasing several megabytes, starting at
15 MB, and eding above 30MB.  Using the mallinfo() stats, I discovered
the amount of free memory increasing instead of being reused.  I
expect this is due to bad memory fragmentation.

Replacing the malloc() implementation with Doug Lea's malloc(),
available from <URL:http://g.oswego.edu/dl/>, changed the situation
completely.  The process size stayed stable around 17MB, and the
amount of free memory rarely moved above 200KB.

I've reported this as a bug to the GNU C library maintainers.

Is KDE using the normal malloc() implementation on Linux, or its own
improved version?  Perhaps changing the malloc() implementation can
reduce the memory usage?

To gather statistics, I ran an automatic test of my program, and
recorded the process size and the information available from
mallinfo().  The difference was stunning.
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic