MOInit

C Specification

#include <mo/Mobiclip.h>

MOResult MOInit(MEMAllocator *pAllocator);

Arguments

pAllocator Memory allocator that will be used by libMobiclip.

Return Values

MO_RESULT_OK Initialization succeeded.
MO_RESULT_ALREADY_INITIALIZED Already initialized.
MO_RESULT_NULL Allocator is NULL.

Description

This function must be called before calling any other Mobiclip Library.

This call will initialize the library and provide it a heap to allocate memory from.

Please note the following:

Note About Memory Usage

The amount of memory needed by Mobiclip API depends on many factors:

Two macros are defined as helpers in the Mobiclip API to approximate the amount of memory needed for standard usages.

These are:

In many cases the amount of memory needed will be significantly less than specified in these macros.

If you want to fine tune the size of the heap you'll give to the MOInit function, the MOMemStat function can give useful informations on the memory usage inside Mobiclip API.

See Also

MOUninit

MOGetTotalInstances

MOMemStat

Revision History

03/26/2009 Parameter renaming done. Added note on memory usage. Added link to MOMemStat function.

07/29/2008 Initial version.