Initial commit of smartalloc code.

Main.c is simply for testing.  No written documentation yet.