Tasking and stack space usage by printf on Sun 3
neal at druhi.att.com
neal at druhi.att.com
Fri Nov 16 23:05:00 AEST 1990
Warning - the Sun 3 implementation of printf (and fprintf, sprintf) uses a
large amount of stack space - over 2000 bytes in normal usage. When you
use the %f format for floating point, the usage goes up to over 20000
bytes!
This may not matter a lot in most situations, but when you are managing
multiple tasks, e.g. using the C++ task library, you need to allocate lots
of space for the stack frames. (The default is 3000 bytes.)
This is true for at least the 4.0 release of SunOS on a Sun 3. Does
anyone know if this is true in 4.1, or on the SPARC implementation? Does
anyone have an alternative implementation of fconvert(), etc?
-Neal McBurnett // AT&T Bell Labs, Denver // neal at druhi.ATT.COM, att!druhi!neal
More information about the Comp.sys.sun
mailing list