EasyManua.ls Logo

Espressif ESP32-S2 - Page 989

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
ptr: Pointer to currently allocated heap memory. Must be a pointer value previously returned by
heap_caps_malloc,malloc,calloc, etc. and not yet freed.
Macros
MALLOC_CAP_EXEC
Flags to indicate the capabilities of the various memory systems.
Memory must be able to run executable code
MALLOC_CAP_32BIT
Memory must allow for aligned 32-bit data accesses.
MALLOC_CAP_8BIT
Memory must allow for 8/16/-bit data accesses.
MALLOC_CAP_DMA
Memory must be able to accessed by DMA.
MALLOC_CAP_PID2
Memory must be mapped to PID2 memory space (PIDs are not currently used)
MALLOC_CAP_PID3
Memory must be mapped to PID3 memory space (PIDs are not currently used)
MALLOC_CAP_PID4
Memory must be mapped to PID4 memory space (PIDs are not currently used)
MALLOC_CAP_PID5
Memory must be mapped to PID5 memory space (PIDs are not currently used)
MALLOC_CAP_PID6
Memory must be mapped to PID6 memory space (PIDs are not currently used)
MALLOC_CAP_PID7
Memory must be mapped to PID7 memory space (PIDs are not currently used)
MALLOC_CAP_SPIRAM
Memory must be in SPI RAM.
MALLOC_CAP_INTERNAL
Memory must be internal; specifically it should not disappear when flash/spiram cache is switched off.
MALLOC_CAP_DEFAULT
Memory can be returned in a non-capability-specific memory allocation (e.g. malloc(), calloc()) call.
MALLOC_CAP_IRAM_8BIT
Memory must be in IRAM and allow unaligned access.
MALLOC_CAP_RETENTION
MALLOC_CAP_RTCRAM
Memory must be in RTC fast memory.
MALLOC_CAP_INVALID
Memory cant be used / list end marker.
Type Definitions
typedef void (*esp_alloc_failed_hook_t)(size_t size, uint32_t caps, const char *func-
tion_name)
callback called when a allocation operation fails, if registered
Parameters
size: in bytes of failed allocation
caps: capabillites requested of failed allocation
function_name: function which generated the failure
Espressif Systems 978
Submit Document Feedback
Release v4.4

Table of Contents