Wednesday, 25 February 2015

Your own malloc function, the very lazy way

The problem:  You want your own malloc function, and there are gazillions of them in the code base you're working on.  You could automate editing this lot, but littering the place with lots of custom xmallocs does not appeal, plus, there is are 3rd party libraries and you don't really want to mess with those.

The solution:  3 different ways of solving.  And: How to coax the linker into compliance for the wrap.




My patch, that puts it all together, using CMake.