bw logo

Chapter 2. Memory Tracker

BigWorld provides a singleton class called MemTracker, which provides the following functionality:

  • Automatic leak detection and reporting.

  • Allocation id.

  • A stack trace for each allocation that leaked.

The first two features are enabled by default without adding any instrumentation or running any external programs. Once leaks are identified, users can re-run the application and break on a given allocation id.

MemTracker works on both Windows and Linux platforms. The stack trace functionality is only available in debug configurations.