As straight to the point as I can be, trying to move over more and more to OS X from Linux, I could do with a quick pointer (ho, ho) to get started with the Apple tools.
Allocate, fill and leak some memory:
Build then Debug -> Launch with Performance Tool -> MallocDebug
results in a minute or two of spinning rainbow wheel followed the dialogue:
Read Data
Unable to read malloc information from /Path/To/Project/Debug/executable
Building from the command line with -lMallocDebug and loading the programme manually gives the same result and loads of multiple definition warnings.
Surely there is something trivial I am missing
Are there any other tools worth checking out? Under Linux I have been using valgrind, pretty much since it was released, which frankly has been the bees knees.
Reference MallocDebug at Apple
Allocate, fill and leak some memory:
Code:
#include <iostream>
#include <algorithm>
int main (int argc, char * const argv[])
{
char *block = new char[100];
std::fill(block, block+100, 'z');
block[0] = 'a';
return 0;
}
Build then Debug -> Launch with Performance Tool -> MallocDebug
results in a minute or two of spinning rainbow wheel followed the dialogue:
Read Data
Unable to read malloc information from /Path/To/Project/Debug/executable
Building from the command line with -lMallocDebug and loading the programme manually gives the same result and loads of multiple definition warnings.
Surely there is something trivial I am missing
Are there any other tools worth checking out? Under Linux I have been using valgrind, pretty much since it was released, which frankly has been the bees knees.
Reference MallocDebug at Apple