Question about pthread_getspecific with jemalloc

Kristen Eisenberg kristen.eisenberg at yahoo.com
Sat Oct 29 13:15:13 PDT 2011


link with jemalloc.  What happens is, after calling malloc(), the
value of one of my keys seems to change out from under me.  Here is a
small example that demonstrates this:
http://itsapad.appspot.com/fancy/6.  I am using jemalloc-2.2.1 on
Linux.  If I compile the example with gcc (ver 4.4.3) using the
following command: 'gcc -lpthread main.c' then both calls to
pthread_getspecific return a NULL pointer as expected.  When I link
with jemalloc, however, ('gcc -ljemalloc -lpthread main.c') then the
second call to pthread_getspecific returns some non-NULL value.  Is
this a known bug or am I doing something wrong?


Kristen Eisenberg
Billige Flüge
Marketing GmbH
Emanuelstr. 3,
10317 Berlin
Deutschland
Telefon: +49 (33)
5310967
Email:
utebachmeier at
gmail.com
Site:
http://flug.airego.de
- Billige Flüge vergleichen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20111029/a21f22f9/attachment.html>


More information about the jemalloc-discuss mailing list