mh+jemalloc at glandium.org
Thu Mar 15 12:58:39 PDT 2012
I'm trying to get jemalloc built for Android, and here is a short list
of things that go wrong:
- pthread_create is not defined in libpthread, but in libc, which makes
the configure.ac test fail.
- The AC_RUN_IFELSE test for STATIC_PAGE_SHIFT fails because it requires
not to be cross-compiling, which makes configure.ac hard-fail.
- Android system headers don't provide sys/sysctl.h. But it seems it's
not used anyways, so removing the include worked for me (and worked on
plain Linux too)
- There are no atomic ops for arm, but the __sync_* ones work. Sadly,
the compiler doesn't define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4.
- Older Android stack doesn't have pthread_atfork. But I don't think you
should care about that. We have a workaround for that.
Apparently, that's all, though I haven't run it yet because of other
integration problems with Firefox.
More information about the jemalloc-discuss