sprintf without realloc?
Darin Johnson
chezdj@earthlink.net
Mon Sep 25 21:07:00 GMT 2006
>My original post wasn't clear; I'm prevented from using any kind of
>*alloc based function that dynamically manages memory.
Hmm, from a quick look at the code, malloc() is really only needed
to support the "%S" and "%ls" formats (wide character strings).
It's likely you don't need this support. So you could just create
_malloc_r and _free_r routines that always return an error.
If you do need the wide character support, then you can have
the _malloc_r and _free_r routines deal with a static buffer, or
change the vfprintf.c to use a static buffer directly.
More information about the Newlib
mailing list