MC_knlAlloc#
Allocate a WIPI-managed memory block and return its memory ID.
Prototype#
M_Uint32 MC_knlAlloc(M_Int32 size);
-
M_Uint32 MC_knlAlloc(M_Int32 size)#
Allocate a WIPI-managed memory block and return its memory ID.
The return value is a memory ID, not a stable C pointer. Resolve it with MC_GETDPTR only for the period in which the pointer is needed.
- Ownership
The caller owns the memory ID and releases it with MC_knlFree.
- API level
WIPI-C 1.2.1, ordinal 161.
- Documentation status
reviewed.
Note
Compaction can invalidate a previously resolved pointer; retain the memory ID instead of the pointer.
- Parameters:
size – Requested allocation size in bytes.
- Returns:
A nonzero memory ID on success, or the provider-defined failure value.
Catalog identity#
Field |
Value |
|---|---|
API level |
|
Family |
|
Ordinal |
161 |
Documentation |
|
Implementation class |
|
ABI class |
|
Usage#
The return value is a memory ID, not a stable C pointer. Resolve it with MC_GETDPTR only for the period in which the pointer is needed.
Parameters#
Name |
Meaning |
|---|---|
|
Requested allocation size in bytes. |
Return value#
A nonzero memory ID on success, or the provider-defined failure value.
Ownership#
The caller owns the memory ID and releases it with MC_knlFree.
Notes#
Compaction can invalidate a previously resolved pointer; retain the memory ID instead of the pointer.
Profile availability#
API membership, device ABI, and install profile are independent. The rows below describe libwipi implementation evidence, not platform-wide WIPI requirements.
ABI profile |
Install profile |
Current evidence |
|---|---|---|
|
|
headers only |
|
|
linkable generated veneer |
|
|
linkable generated veneer |
|
|
linkable generated veneer; named-device candidate |
|
|
observed in the scoped emulator suite |
|
|
observed in the scoped emulator suite |
|
|
linkable exact-device fixed-root veneer |
Compiled examples#
Evidence boundary#
Samsung/KTF selector confidence: confirmed. Catalog evidence: anycall_magichole:analysis/decompiled/wipi_mc_knl_spec_adapter.c:1114.