This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
MALLOC_PROVIDED HOWTO
- From: Alex Austin <alex dot austin at spectrumdsi dot com>
- To: "newlib at sources dot redhat dot com" <newlib at sources dot redhat dot com>
- Date: Tue, 29 Jul 2008 10:02:32 -0700
- Subject: MALLOC_PROVIDED HOWTO
- Accept-language: en-US
- Acceptlanguage: en-US
My host OS has no sbrk(), so I need to reimplement malloc to use the host's memory routines. What all do I need to do? Where do I put my source, and what all needs to be defined?
So far I did:
../newlib-1.16.0/newlib/configure --host=arm-elf --target=arm-elf --enable-interwork --enable-multilib CFLAGS="-fshort-enums -mapcs -mno-apcs-stack-check -msoft-float -mfpu=fpa -fdollars-in-identifiers
-omit-frame-pointer -march=armv5te -mthumb-interwork -O0 -g3 -DMALLOC_PROVIDED"
Compilation is hanging up at:
../../../newlib-1.16.0/newlib/libc/stdlib/mstats.c:125:34: macro "_mallopt_r" passed 3 arguments, but takes just 2
../../../newlib-1.16.0/newlib/libc/stdlib/mstats.c: In function `mallopt':
../../../newlib-1.16.0/newlib/libc/stdlib/mstats.c:125: error: `_mallopt_r' undeclared (first use in this function)
... (more errors) ...
Thank you,
- Alex