lots of allocator hacks, getting towards 64-bit support :)