DragonFly bugs List (threaded) for 2011-08
[Date Prev][
Date Next]
[Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
[issue1532] jemalloc doesn't work on DragonFly
Alex Hornung <ahornung@gmail.com> added the comment:
Sam, have you looked into this? jemalloc seems to use _SPINLOCK in some cases,
depending on how the defines are set up, short grep:
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#else
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c:static
malloc_mutex_t init_lock = {_SPINLOCK_INITIALIZER};
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#endif
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-
--
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-
return (true);
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#elif
defined(MOZ_MEMORY_DARWIN)
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c: mutex->lock =
OS_SPINLOCK_INIT;
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#elif
defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID)
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-
pthread_mutexattr_t attr;
--
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c- return
(true);
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#else
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c: static const
spinlock_t lock = _SPINLOCK_INITIALIZER;
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c- mutex->lock = lock;
--
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#else
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c- if (__isthreaded)
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c:
_SPINLOCK(&mutex->lock);
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#endif
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-}
--
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-
return (true);
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#elif
defined(MOZ_MEMORY_DARWIN)
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c: lock->lock =
OS_SPINLOCK_INIT;
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#elif
defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID)
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-
pthread_mutexattr_t attr;
--
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c- return
(true);
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#else
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c: lock->lock =
_SPINLOCK_INITIALIZER;
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#endif
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c- return (false);
--
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#else
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c- if (__isthreaded)
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c:
_SPINLOCK(&lock->lock);
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-#endif
. /www/firefox/work/mozilla-release/memory/jemalloc/jemalloc.c-}
So in principle it shouldn't be too hard to get it to work. I'll have a look
myself tonight and see what can be done, but maybe you've already made some
progress on this?
Cheers,
Alex
_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1532>
_____________________________________________________
[Date Prev][
Date Next]
[Thread Prev][
Thread Next]
[
Date Index][
Thread Index]