[uClibc]uClibc features?
David Schleef
ds at schleef.org
Sat Jul 21 09:01:47 UTC 2001
On Sat, Jul 21, 2001 at 12:11:58AM -0400, Tom Cameron wrote:
> What kind of size impact on the libraries would this have? Smaller or
> larger (not that I care). Also, what about speed? Would the execution of
> functions within the libraries be any faster, or slower? Just curious.
Like all features, it will probably make it a little larger and a
little slower. One common performance hit with a thread-safe libc is
that errno has to be hidden behind a macro, typically something
like:
#define errno (*__errno_location())
This means that every time you set or check errno, you have an
extra library call and whatever kind of lookup involved. Then you
need to add locking to any shared data structure -- I'm not sure
how heavy this ends up being in user space.
However, the process of thread-safing a library has at least one
advantage that is interesting in uClibc's case -- basically every
global variable can be moved from the data section to the static
data section, causing processes to share more RAM, and potentially
saving a small amount of RAM (4-20 kB as a guess) per process. This
would be a noble undertaking in itself.
dave...
More information about the uClibc
mailing list