[uClibc]uClibc features?

Tom Cameron TCameron at stmarysbank.com
Sat Jul 21 20:20:02 UTC 2001


Thank you!  Now I understand.

-----Original Message-----
From: David Schleef
To: Tom Cameron
Cc: uclibc at uclibc.org
Sent: 07/21/2001 05:01
Subject: Re: [uClibc]uClibc features?

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