Skip to main content

Name

ec_memtype_by_name — Returns the memtype id for a given memtype name

Synopsis

#include "ec_malloc.h"

| int **ec_memtype_by_name** ( | name); |   |

const char * <var class="pdparam">name</var>;

Description

Returns the memtype id for a given memtype name.

This walks the list of memtypes each time it is invoked; it is recommended that this function be called once and the result cached.

Parameters

name

The memtype name. For more information about memory names and types see Memory Types.

Return Value

This function returns the memtype ID. If the name does not exist, it returns MEMTYPE_REGISTER_FAILED (-1).

Threading

You can call this function in any thread.

See Also

Was this page helpful?