[Nix-dev] GCC 5, Matplotlib, and tcmalloc don't work together

Vladimír Čunát vcunat at gmail.com
Thu Jun 2 15:24:10 CEST 2016


On 06/02/2016 01:37 PM, Andreas Herrmann wrote:
>> Deallocating memory that was allocated by a different allocator 
>> certainly means trouble, and immediate crash is the better option
>> IMO.
> My understanding was the following, and please correct me if I'm
> wrong. I thought that Python was using the allocator it was compiled
> with (glibc) and my C++ module would be using the allocator it was
> compiled with (tcmalloc). [...]

I'm not even certain of that, due to whatever happens during linking the
malloc symbol. I can't say I truly understand such low-level stuff.

>> BTW, tcmalloc compares itself to glibc-2.3; IIRC since then the
>> default allocator has improved significantly, in particular in
>> multi-threaded usage.
> 
> I found notable speedups between tcmalloc and glibc malloc (whichever
> version was in nix at that point) about a year ago for my use-case.
> Since then I haven't checked again.

I find it unlikely that glibc's malloc would've changed significantly
during the last year, so tcalloc is probably still faster in your use case.

--Vladimir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3771 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160602/c622b2ab/attachment.p7s>


More information about the nix-dev mailing list