For different purposes I need to provide an interface that implementents the following functions in C#
- malloc
- calloc
- realloc
- free
But I would prefer to not to code it myself (why reinvent the wheel). A better solution would be when my alloc-functions was called, I would simplely call the alloc-functions in stdlib.h, the interface is made so I "just" need to call those functions.
The question is, how do I access the functions in the stdlib.h from C#? I know about platform invoke, and I am getting better at it. But for platform invoke to work, I need a .dll And I don't know which .dll implements the stdlib.h