News for hackers. Stuff that matters.
Re:Clang emits memcpy for std::swap, which can introduce und... by ktRolster on Sunday April 24, 2016 @04:38PM (#11561276)
For debugging purposes, it can sometimes be easier to include a header file "mem_debug.h" or whatever, and redefine malloc:

  >#define malloc(a) debug_malloc(a, __FILE__, __LINE__)
  >#define free(a)   debug_free(a, __FILE__, __LINE__)
  >.
  >.
  >.
Then in your debug_malloc() function you can track where every allocation took place. Not always applicable but nice when it works.

There are no comments on this comment yet.