lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


So what you're suggesting is that every app or library you run on your embedded system create its own mini-printf as needed. If you have enough libraries doing that you'll go over the size of the standard C's implementation anyway. Plus there is the wasted human effort.

If you don't buy that, then consider that if your apps and libraries truly don't require the full printf, then all you need do is replace the standard C's implementation according to your constraints (and cover everything you run on your system in one swipe). With this, the person that needs the special case is the one that does the special work, and everyone else gets the generality afforded by the C library.

-John


John Passaniti wrote:
If *printf is already linked in elsewhere by Lua, I guess I don't have a
big problem with this.  The cost of the format interpreter is already
there.  But if this is the only place where *printf is used, then I
would prefer that Lua *not* use *printf.

Those of us who work with embedded systems typically have memory
constraints we have to worry about, and the core routine that implements
the *printf family of functions can be a surprisingly huge-- both in
terms of code, and in some implementations stack and RAM usage.  For
those using Lua on desktop systems, with gobs of virtualized memory,
none of this matters.  For those who are trying to fit inside limited
address spaces, we cringe anytime anyone wants to link in something
large.


--
http:// i      .   /