Just the implementation of some c style memory manager functions