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.