# MO_InitDTCMArea

## C Specification

  `#include <nitro/mobiclip.h>`
  `void MO_InitDTCMArea ( void* dtcmPtr, u32 size );`

## Description

Give to Mobiclip the address and size in bytes of the usable DTCM area.
This function is used for data relocation management.

If this function is not called or the size given in parameter is 0, Mobiclip core data will reside in main memory.
If the size given in parameter is greater or equal to the value returned by MO_GetOptimalDTCMSize function,
all the core data of Mobiclip will be relocated to this area.
If the size given in parameter is less than the value returned by MO_GetOptimalDTCMSize function,
Mobiclip will try to relocate parts of its core data to this area.
If only parts or none of the core data resides in DTCM, playback performance will NOT be optimal.

You can call this function several times with different paramaters; for each call the data relocation state will be resetted.
This function MUST NOT be called when a Mobiclip movie handle is still opened.

To reallocate DTCM, sufficient free space in DTCM arena is required.
The default settings given to the linker program do not reserve any free space in the DTCM arena, all available DTCM space is reserved for stack usage of the main thread.
For stack size settings, lcf (linker command file) is used.
Please refer to NitroSDK's reference manual for details.

## Arguments

dtcmPtr | Address of the usable DTCM area.
size | Size in bytes of the usable DTCM area.

## Return Values

Nothing.

## See Also

`MO_GetOptimalITCMSize`
`MO_GetOptimalDTCMSize`
`MO_InitITCMArea`

## Revision History

03/13/2008 Added paragraph about linker settings
03/03/2008 Initial Version