On 5/7/07, valiy <[EMAIL PROTECTED]> wrote:
Vlad GALU wrote: > On 5/7/07, valiy <[EMAIL PROTECTED]> wrote: > [...] > It might be related to phkmalloc vs jemalloc. You may want to try > to link against jemalloc to see if the slowdown still occurs. > http://lists.freebsd.org/pipermail/freebsd-stable/2006-October/029186.html
Fetch the HEAD revision of http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/tree.h and overwrite your existing file using it. Afterwards, fetch the HEAD revision of http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/malloc.c. Last step: gcc -fPIC -O -Wall -I/usr/src/lib/libc/include -I/usr/src/sys -shared -o malloc.so malloc.c Or if you want to compile it into a simple object that you can then link directly in your application, gcc -O -Wall -I/usr/src/lib/libc/include -I/usr/src/sys -o malloc.o malloc.c HTH.
[EMAIL PROTECTED] ~]# cp /7.0_CURRENT/src/lib/libc/stdlib/malloc.c /tmp/jemalloc.so [EMAIL PROTECTED] ~]# gcc -O -Wall -I/usr/src/lib/libc/include -shared -o /lib/jemalloc.so /tmp/jemalloc.c /tmp/jemalloc.c:1197: warning: type defaults to `int' in declaration of `RB_GENERATE_STATIC' /tmp/jemalloc.c:1197: warning: parameter names (without types) in function declaration /tmp/jemalloc.c:1197: warning: data definition has no type or storage class /tmp/jemalloc.c: In function `chunk_alloc': /tmp/jemalloc.c:1267: warning: implicit declaration of function `chunk_tree_s_RB_MINMAX' /tmp/jemalloc.c:1267: warning: assignment makes pointer from integer without a cast /tmp/jemalloc.c:1273: warning: implicit declaration of function `chunk_tree_s_RB_NEXT' /tmp/jemalloc.c:1273: warning: assignment makes pointer from integer without a cast /tmp/jemalloc.c:1276: warning: implicit declaration of function `chunk_tree_s_RB_REMOVE' /tmp/jemalloc.c: In function `chunk_dealloc': /tmp/jemalloc.c:1444: warning: implicit declaration of function `chunk_tree_s_RB_FIND' /tmp/jemalloc.c:1444: warning: comparison between pointer and integer /tmp/jemalloc.c:1451: warning: implicit declaration of function `chunk_tree_s_RB_INSERT' /tmp/jemalloc.c: At top level: /tmp/jemalloc.c:1597: warning: type defaults to `int' in declaration of `RB_GENERATE_STATIC' /tmp/jemalloc.c:1597: warning: parameter names (without types) in function declaration /tmp/jemalloc.c:1597: warning: data definition has no type or storage class /tmp/jemalloc.c: In function `arena_chunk_alloc': /tmp/jemalloc.c:1794: warning: implicit declaration of function `arena_chunk_tree_s_RB_INSERT' /tmp/jemalloc.c: In function `arena_chunk_dealloc': /tmp/jemalloc.c:1875: warning: implicit declaration of function `arena_chunk_tree_s_RB_REMOVE' /tmp/jemalloc.c: In function `arena_run_alloc': /tmp/jemalloc.c:2051: warning: implicit declaration of function `arena_chunk_tree_s_RB_MINMAX' /tmp/jemalloc.c:2051: warning: assignment makes pointer from integer without a cast /tmp/jemalloc.c:2051: warning: implicit declaration of function `arena_chunk_tree_s_RB_NEXT' /tmp/jemalloc.c:2051: warning: assignment makes pointer from integer without a cast /tmp/jemalloc.c: In function `huge_dalloc': /tmp/jemalloc.c:2730: warning: assignment makes pointer from integer without a cast /tmp/jemalloc.c: In function `isalloc': /tmp/jemalloc.c:2944: warning: assignment makes pointer from integer without a cast /tmp/jemalloc.c: In function `malloc_init_hard': /tmp/jemalloc.c:3114: warning: 'opts' might be used uninitialized in this function /tmp/jemalloc.c: In function `calloc': /tmp/jemalloc.c:3559: warning: 'num_size' might be used uninitialized in this function /tmp/jemalloc.c: At top level: /tmp/jemalloc.c:1183: warning: 'chunk_comp' defined but not used /tmp/jemalloc.c:1583: warning: 'arena_chunk_comp' defined but not used could you please send me you version of malloc.c ?
-- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

