Porting jemalloc to Android

최영일 duddlf.choi at samsung.com
Wed Jun 12 02:28:16 PDT 2013


Hi,

Anyone succeed to port Android ?

I tried like below but got SEGV on simple malloc test program.

- modify configure.ac to pass cross compile 
957c957,958
<                              [je_cv_static_page_shift=undefined]))
---
>                              [je_cv_static_page_shift=undefined],
>                              [je_cv_static_page_shift=12]))
                   
- configure with NDK

configure --disable-experimental --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi EXTRA_CFLAGS="-fno-omit-frame-pointer -DUSE_UTF8 -O2 -fPIC -std=gnu99 " LDFLAGS=" -fPIC -std=gnu99" CC="/opt/ndk_standalone/bin/arm-linux-androideabi-gcc" CXX="/opt/ndk_standalone/bin/arm-linux-androideabi-g++" AR="/opt/ndk_standalone/bin/arm-linux-androideabi-ar"

- Add dummy pthread_atfork.c

int pthread_atfork(void (*prefork)(void),
                   void (*postfork_parent)(void),
                   void (*postfork_child)(void))
{
  return 0;
}



More information about the jemalloc-discuss mailing list