Quick Start

Welcome to the Alloclave Quick Start Guide! Follow these instructions, and you’ll be up and running in no time.

Collector Setup

Step One

First, you need to integrate the Alloclave Collector into your C++-based application.

The collector source is located in the Alloclave install directory under the “collector” folder. The default installation path is “C:\Program Files\Alloclave\collector”.

The file you need to compile into your application is called “alloclave.cpp”.

 

Step Two

Now that the collector is built into your project, you need to tell it how to hook into your memory allocation functions. There are two ways to do this. Which way you use depends on how your project is setup.

Option 1: No custom memory manager
If your project does not have a custom memory manager, Alloclave can override the default new/delete memory allocators itself. To do this, you need to include the header “alloclave.h” in such a way that it gets included in all your other source files. If you have a “common.h” or “core.h”, this is an excellent place to include “alloclave.h”. If not, it can also be included via the “Forced Includes” setting in project options under C/C++ -> Advanced.
Option 2: Custom memory manager
If your project already has a memory manager, Alloclave can handle this situation as well. In the source file where your allocation and free functions live, first include the “alloclave.h” file. This header has functions named “RegisterAllocation” and “RegisterFree”. Each time an allocation or free happens in your custom functions, you need to pass the data to these registration functions.

That’s It!

That’s all you need to do to integrate Alloclave! Once you’ve finished building, launch the Alloclave tool (which was added to your start menu/screen), and click “New Profile”. Then run your application and watch the data collection begin!Have questions? Was something not clear in this guide? Did you have any issues building after adding the collector? Please email us.

Looking for more advanced options, or need to customize Alloclave? Check out the manual for exciting things like custom transports, custom symbol parsing, and alternative threading options.