Share

libumem

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Tracker: Patches

5 Linux AMD64 support - ID: 1548294
Last Update: Attachment added ( highlandsun )

A few tiny patches to enable using libumem with
LD_PRELOAD on Linux.

1) For AMD64, the UMEM_PTHREAD_MUTEX_TOO_BIG macro
needs to be defined. Most likely this should just be
made dependent on __LP64, or a real autoconf test
should be written to check it.

2) For use with LD_PRELOAD, the malloc replacements
must be present, and you must arrange for umem_startup
to be called at load time. I added a umem_do_startup
constructor for this purpose.

3) Recursive calls into malloc at library
initialization time are really hairy. The call to
sysconf() to get the number of CPUs winds up calling
fopen() which of course calls malloc, so I wrote a
quick hack to read /proc/cpuinfo for this information.
There are many other recursions of this type that can
be triggered when libumem is preloaded into various
programs. I only fixed this one because it's enough to
get my target program running.


Howard Chu ( highlandsun ) - 2006-08-29 02:52

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File ( 1 )

Filename Description Download
dif unidiff Download

Change ( 1 )

Field Old Value Date By
File Added 191059: dif 2006-08-29 02:52 highlandsun