printnum() is no longer recursive
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 28 Aug 2013 16:02:43 +0000 (09:02 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 28 Aug 2013 16:17:32 +0000 (09:17 -0700)
commitfefe9cbcb52d9ba13e46bf7dfc2e5ce09afba98a
treeaca40bd9d6bf36dc597842245a9fcdc7571aa243
parentd11c0b00c547f9b5f7db9d38d12b4bfdc5be8dcd
printnum() is no longer recursive

When printing a full 64 bit pointer in hex (16 'digit's), printnum()
consumed over 1KB of stack, which can run off the end of the kernel
stack.  We use about 80B per frame.

I'm not concerned about the repeated divisions; the actual output is far
more expensive than that, last I checked.
kern/src/printfmt.c