jemalloc usage for bare metal cortex A53 : Multicore

Jason Evans jasone at
Mon Jan 11 12:22:12 PST 2016

On Oct 5, 2015, at 4:53 AM, Monika TRIPATHI <monika.tripathi at> wrote:
> This is regarding usage of jemalloc, I want to use jemalloc for bare metal cortex A53 malloc (since bare metal gcc does not support malloc for multicore).
> when I use gcc  
> Using built-in specs.
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) \
> Then I can see the make is OK , where as when I use “bare-4.8.2-3/bin//arm-none-eabi-gcc”
> Then I get error
> In file included from include/jemalloc/internal/jemalloc_internal.h:5:0,
>                  from src/jemalloc.c:2:
> include/jemalloc/internal/jemalloc_internal_decls.h:11:24: fatal error: sys/mman.h: No such file or directory
> #  include <sys/mman.h>
>                         ^
> compilation terminated.
> make: *** [src/jemalloc.pic.o] Error 1
> Now the problem is since I am working in baremetal I have to use ““bare-4.8.2-3/bin//arm-none-eabi-gcc”

jemalloc requires the mmap() system call, so if you want to port to an environment that lacks the system call, you're going to have to provide an alternative, remove the #include <sys/mman.h>, etc.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the jemalloc-discuss mailing list