Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LINUX safe malloc ?

63 views
Skip to first unread message

MoranTza

unread,
Aug 29, 2009, 2:23:39 AM8/29/09
to
In Solaris I am using "-lmtmalloc", is there something similar in
LINUX.

BTW to make my concurrent malloc work I had to "setenv MALLOC_CHECK_
1"

Thanks,
Moran Tzafrir.
http://www.cs.tau.ac.il/research/moran.tzafrir/

Loïc Domaigné

unread,
Aug 30, 2009, 3:24:11 PM8/30/09
to
Hi Moran,

> In Solaris I am using "-lmtmalloc", is there something similar in
> LINUX.
>
> BTW to make my concurrent malloc work I had to "setenv MALLOC_CHECK_
> 1"

As of my knowledge, recent glibc on Linux uses ptmalloc2 which is
already optimized for multi-threaded process. You may want to
investigate other memory allocators like:
* hoard: http://www.hoard.org/
* nedmalloc: http://www.nedprod.com/programs/portable/nedmalloc/

HTH,
Loïc
--
My Blog: http://www.domaigne.com/blog

"A computer lets you make more mistakes faster than any invention in
human history–with the possible exceptions of handguns and tequila."
-- Mitch Radcliffe

Jim Balson

unread,
Mar 23, 2010, 12:28:18 PM3/23/10
to
Loïc Domaigné wrote:
> Hi Moran,
>
>> In Solaris I am using "-lmtmalloc", is there something similar in
>> LINUX.
>>
>> BTW to make my concurrent malloc work I had to "setenv MALLOC_CHECK_
>> 1"
>
> As of my knowledge, recent glibc on Linux uses ptmalloc2 which is
> already optimized for multi-threaded process. You may want to
> investigate other memory allocators like:
> * hoard: http://www.hoard.org/
> * nedmalloc: http://www.nedprod.com/programs/portable/nedmalloc/
>

Or the following:

http://www.cherrystonesoftware.com

Jim

Ionut Rosoiu

unread,
Mar 24, 2010, 4:08:49 AM3/24/10
to
On Mar 23, 6:28 pm, Jim Balson <lab...@cherrystonesoftware.com> wrote:
> Loïc Domaigné wrote:
> > Hi Moran,
>
> >> In Solaris I am using "-lmtmalloc", is there something similar in
> >> LINUX.
>
> >> BTW to make my concurrent malloc work I had to "setenv MALLOC_CHECK_
> >> 1"
>
> > As of my knowledge, recent glibc on Linux uses ptmalloc2 which is
> > already optimized for multi-threaded process. You may want to
> > investigate other memory allocators like:
> > * hoard:http://www.hoard.org/
> > * nedmalloc:http://www.nedprod.com/programs/portable/nedmalloc/
>
>         Or the following:
>
>                http://www.cherrystonesoftware.com


TCMalloc [1] might also be a solution.

[1] http://goog-perftools.sourceforge.net/doc/tcmalloc.html


Ionut

Casper H.S. Dik

unread,
Mar 24, 2010, 5:11:25 AM3/24/10
to
Jim Balson <lab...@cherrystonesoftware.com> writes:

>Loïc Domaigné wrote:
>> Hi Moran,
>>
>>> In Solaris I am using "-lmtmalloc", is there something similar in
>>> LINUX.
>>>
>>> BTW to make my concurrent malloc work I had to "setenv MALLOC_CHECK_
>>> 1"
>>
>> As of my knowledge, recent glibc on Linux uses ptmalloc2 which is
>> already optimized for multi-threaded process. You may want to
>> investigate other memory allocators like:
>> * hoard: http://www.hoard.org/
>> * nedmalloc: http://www.nedprod.com/programs/portable/nedmalloc/
>>

> Or the following:

> http://www.cherrystonesoftware.com

There's also "libumem" (in OpenSolaris); it is concurrent and
has interesting features. It exists as of Solaris 10 and allows
for easy detecting leaks. Not sure whether it is easy to port
to Linux. (Finding leaks also requires the mdb debugger)

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

0 new messages