3 ms·
Yes, it can be done. I don't know about Go, but this is already done for other languages. In C/C++, you can override the memory allocation functions (malloc, de
by cocoa19 9y ago
Yes, it can be done. I don't know about Go, but this is already done for other languages. In C/C++, you can override the memory allocation functions (malloc, delete, new, free, etc) based on the type of heap objects you are going to handle.
Most or all C and C++ standard libraries come with generic allocators that work OK in most scenarios, but not optimally for specific scenarios.