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
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
