Would like to also have the ability to define a custom memory allocator as we do for free and copy functions.