mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
esp_wifi: Add API to get available internal heap size
This commit is contained in:
@@ -555,7 +555,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = {
|
|||||||
._task_get_max_priority = task_get_max_priority_wrapper,
|
._task_get_max_priority = task_get_max_priority_wrapper,
|
||||||
._malloc = malloc,
|
._malloc = malloc,
|
||||||
._free = free,
|
._free = free,
|
||||||
._get_free_heap_size = esp_get_free_heap_size,
|
._get_free_heap_size = esp_get_free_internal_heap_size,
|
||||||
._rand = esp_random,
|
._rand = esp_random,
|
||||||
._dport_access_stall_other_cpu_start_wrap = esp_dport_access_stall_other_cpu_start_wrap,
|
._dport_access_stall_other_cpu_start_wrap = esp_dport_access_stall_other_cpu_start_wrap,
|
||||||
._dport_access_stall_other_cpu_end_wrap = esp_dport_access_stall_other_cpu_end_wrap,
|
._dport_access_stall_other_cpu_end_wrap = esp_dport_access_stall_other_cpu_end_wrap,
|
||||||
|
@@ -130,6 +130,16 @@ uint32_t system_get_time(void) __attribute__ ((deprecated));
|
|||||||
*/
|
*/
|
||||||
uint32_t esp_get_free_heap_size(void);
|
uint32_t esp_get_free_heap_size(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the size of available internal heap.
|
||||||
|
*
|
||||||
|
* Note that the returned value may be larger than the maximum contiguous block
|
||||||
|
* which can be allocated.
|
||||||
|
*
|
||||||
|
* @return Available internal heap size, in bytes.
|
||||||
|
*/
|
||||||
|
uint32_t esp_get_free_internal_heap_size(void);
|
||||||
|
|
||||||
/** @cond */
|
/** @cond */
|
||||||
/**
|
/**
|
||||||
* @brief Get the size of available heap.
|
* @brief Get the size of available heap.
|
||||||
|
@@ -338,6 +338,11 @@ uint32_t esp_get_free_heap_size( void )
|
|||||||
return heap_caps_get_free_size( MALLOC_CAP_DEFAULT );
|
return heap_caps_get_free_size( MALLOC_CAP_DEFAULT );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t esp_get_free_internal_heap_size( void )
|
||||||
|
{
|
||||||
|
return heap_caps_get_free_size( MALLOC_CAP_8BIT | MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL );
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t esp_get_minimum_free_heap_size( void )
|
uint32_t esp_get_minimum_free_heap_size( void )
|
||||||
{
|
{
|
||||||
return heap_caps_get_minimum_free_size( MALLOC_CAP_DEFAULT );
|
return heap_caps_get_minimum_free_size( MALLOC_CAP_DEFAULT );
|
||||||
|
Reference in New Issue
Block a user