How to track memory allocations in C++ (especially new/delete)

I would recommend you to use valgrind for linux. It will catch not freed memory, among other bugs like writing to unallocated memory. Another option is mudflap, which tells you about not freed memory too. Use -fmudflap -lmudflap options with gcc, then start your program with MUDFLAP_OPTIONS=-print-leaks ./my_program. Here’s some very simple code. It’s not … Read more

Segfaults in malloc() and malloc_consolidate()

From http://www.gnu.org/s/libc/manual/html_node/Heap-Consistency-Checking.html#Heap-Consistency-Checking: Another possibility to check for and guard against bugs in the use of malloc, realloc and free is to set the environment variable MALLOC_CHECK_. When MALLOC_CHECK_ is set, a special (less efficient) implementation is used which is designed to be tolerant against simple errors, such as double calls of free with the same … Read more

How can I specify location of debug keystore for Android ant debug builds?

You should be able to specify the keystore to use with these properties key.store=/path/to/key.keystore key.alias=alias key.store.password=pass key.alias.password=pass Just pass the properties in to Ant. [EDIT] From the docs at http://developer.android.com/guide/publishing/app-signing.html#setup The Android build tools provide a debug signing mode that makes it easier for you to develop and debug your application, while still meeting the … Read more