Skip to main content

Name

ec_mt_register — Implementation specific memtype initialization routine

Synopsis

#include "ec_malloc.h"

| int **ec_mt_register** ( | def, |   | |   | impl_data); |   |

const mem_type_def * <var class="pdparam">def</var>; void ** <var class="pdparam">impl_data</var>;

Description

**Configuration Change. ** This feature is available starting from Momentum 3.0.18.

Implementation specific memtype initialization routine. For more information about memory types see Memory Types.

Warning

Do not call this function directly, use ec_memtype_register.

This is used to allow an allocator implementation to perform memtype-specific initialization. For instance, a slab allocator may want to initialize the slab information here.

The implementation may set *impl_data to hold a pointer to its state.

If this function returns 0, the registration of the given memtype is treated as failed. If this function returns 1, the registration of the given memtype is treated as successful. If this function returns any other value, the behavior is undefined.

See Also

Was this page helpful?