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: printf size requirement


Umm,... to add some historical context:

printf() has always been heavy weight,
since it requires malloc() (to potentially allocate
the buffer for buffered I/O), and there was
a special hack in PDP-11 compilers to determine
whether the floating-point-capable version of
printf() needed to be linked or not.

I am sure I remember reading a warning
about the resulting size of executables
when using stdio.

Programs which just fit into the 64K of the PDP-11,
such as the Bourne Shell, did not use stdio and
had idiosyncratic ways of allocating memory.

So in that sense, this isn't really a shortcoming
of newlib; it's just always been that way.  Users
have no right to expect that programs using
printf() be small.

VxWorks' printf() is implemented independently of
the rest of stdio and therefore does not suffer
the weight, but also does not have the performance
advantage of buffered I/O (as far as I understand).

Regards,

Konrad


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