Oso Memory Profiler

4.5 - OsoMP_Initialise

Initialises the Oso Memory Profiler SDK.

void OsoMP_Initialise( const char* filename,
                       const char* hostname,
                       UInt16      port,
                       UInt32      sessionid );
filename Specifies the name of a file to which profile data will be saved.

The filename is not modified in any way. It can be an absolute path, relative path, or any network share that your application can access through fopen.

If local profiling is not required, this parameter can be NULL.
hostname The network name of a machine that is running an instance of the Oso Memory Profiler.

Providing a valid hostname and port will initialise the profiler for remote profiling. Profile data will be sent directly to the Oso Memory Profiler running on the specified host.

If remote profiling is not required, this parameter can be NULL.
port Port number on which to connect to the Oso Memory Profiler.

The default port number is defined in OsoMemoryProfiler.h as OSOMP_PortNumber. This can be changed, however, in the Oso Memory Profiler preferences dialog.
sessionid Application defined session identifier. Session identifiers should be unique on a per-application basis.

The Oso Memory Profiler can close sessions automatically when a new session with a matching identified connects or is loaded. If this functionality is not required, this parameter can be 0.

Future versions of the Oso Memory Profiler might use the session identifiers for more advanced features.
This function must be called from your implementation of OsoMP_InitialiseCallback.