Revert "adding custom memory allocator support"

This reverts commit 716a6067cabbdece57ef39c93fb76c5b2951dab2.
Revert "adding custom memory allocator support"

This reverts commit 754bf4ee6046eb1db63ce3700f763ffe4e42b2ac.