add global allocator function to gaia.