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

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


[Rik Hemsley]
> We are generally using the C++ operator new(), which AFAIK is just
> calling the standard libc malloc().

Yeah.  So do the program I used to test and discover this.

> This replacement malloc() sounds very interesting. I've been a
> little suspicious for a while that Linux isn't particularly
> well-tuned for C++, and perhaps this can help.

I suspect this is a problem with C as well.  It should not be related
to C++ at all.  It might be related to our use of threads (one glibc
bugreport mentions some problems with multiple malloc areanas in
multithreaded programs), but I do not yet understand why this problem
is triggered.

> If you could give us a brief description of how you replaced malloc
> calls in your app with Doug Lea's malloc, that would be very
> helpful, in case there are any pitfalls we might not notice when
> trying it.

Using the replacement is simple.  Copy the .c file from the web page
and compile and link you program with it.  Adding it to the KDE core
libraries should make sure all KDE programs use this malloc() instead
of the libc malloc().

I'm trying to find a way to get the GNU malloc() to behave as it
should, and will need to test some more before I know the result.  Our
solution is obviously to change malloc() implementation, but I want to
find and fix the problem with GNU malloc() to reduce the memory usage
of the rest of the programs on my workstation. :-)
 
>> 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