This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: sprintf without realloc?


>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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]