Is there a good reason why printf() needs a heap, or is it a wasteful tradition of pretending that malloc() and free() are free?
-
-
Replying to @travisgoodspeed
@travisgoodspeed printf can choose to interpret %.950e as a conversion requiring somewhat expensive computations and a bit of memory.1 reply 0 retweets 1 like -
Replying to @volatile_void
@travisgoodspeed for more examples of tradeoffs, perhaps@RichFelker can help?1 reply 0 retweets 0 likes -
Replying to @volatile_void
@spun_off
@travisgoodspeed@RichFelker CAN such a conversion be done in constant space (which is all you have in a heapless printf())?2 replies 0 retweets 0 likes
Replying to @cr1901
@cr1901 @spun_off @travisgoodspeed Yes; see my implementation in musl.
6:36 AM - 8 Feb 2016
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.