Lightweight (subset) of standard C library (ANSI C library)
When I want a truly light-weight (and/or one that is thread-safe) library I usually write my own. It's not hard to do.

Since you discuss a "memory allocator," let me suggest that a malloc()/free pair is trivial to write -- perhaps a few dozen lines:

#define STATUSFREE 0
#define STATUSUSED 1
struct tag {
    struct tag * next;
    int status;
};
struct tag * heap;
void free( void * p ) {
    struct tag * ptag= ((struct tag *)p) - 1;
        ptag-&gt;status= STATUSFREE;
}
void * malloc( size_t s ) {
    struct tag *ptag, *pnext;
        for ( ptag= heap; ptag != NULL; ptag= ptag-&gt;next )
            if (ptag-&gt;status == STATUSFREE) {
                for ( pnext= ptag-&gt;next; pnext-&gt;status == STATUSFREE; pnext= pnext-&gt;next )
                    ;
                if ( s &lt;= (size_t) (((char *) pnext) - (char *) (ptag+1)) ) {
                    if ( s &lt;= (size_t) (((char *) pnext) - (char *) (ptag+2)) ) {
                        ptag-&gt;next= (struct tag *) (s + (char *) (ptag+1));
                        ptag-&gt;next-&gt;status= STATUSFREE;
                        ptag-&gt;next-&gt;next= pnext;
                    } else
                        ptag-&gt;next= pnext;
                    ptag-&gt;status= STATUSUSED;
                    return ptag+1;
                }
                ptag-&gt;next= pnext;
            }
    return NULL;
}


You initialize it the following way. First, set up a fixed block of memory using a standard array allocation like this:

static char mspace[1000];


That can be placed into some module you write. It should be allocated as static lifetime, of course.

Then, somewhere else (like in main()), you do the following:

((struct tag *) &amp;mspace[0])-&gt;status= STATUSFREE;
((struct tag *) &amp;mspace[0])-&gt;next= &amp;((struct tag *) &amp;mspace[sizeof(mspace)])[-1];
((struct tag *) &amp;mspace[sizeof(mspace)])[-1].status= STATUSUSED;
((struct tag *) &amp;mspace[sizeof(mspace)])[-1].next= NULL;
heap= (struct tag *) &amp;mspace[0];


It's very fast and very easy.

strlen() is, of course, much easier and you can find all manner of implementation on the web for that.

The rest? I'd recommend that you write those, too. A very, very helpful book here is P. J. Plauger's (one of the founders of Whitesmiths LTD -- compiler company) "The Standard C Library." Just get a copy. You won't be sorry. It covers things like sprintf() for you, which is much more complicated and may involve treating with floating point values when converting for output. (When you re-create sprintf(), you will haul in lots of code as a result of that -- but it's just needed if you want such a powerful library function.)