Add ability to use custom memory management functions
Merge pull request #3 from alexeyvo/custom_mem_funcs

Add ability to use custom memory management functions