mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
Heap tracing support
This commit is contained in:
@@ -189,11 +189,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef INCLUDE_pcTaskGetTaskName
|
||||
#if ( configENABLE_MEMORY_DEBUG == 1)
|
||||
#define INCLUDE_pcTaskGetTaskName 1
|
||||
#else
|
||||
#define INCLUDE_pcTaskGetTaskName 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef configUSE_APPLICATION_TASK_TAG
|
||||
|
||||
@@ -231,12 +231,6 @@
|
||||
#define INCLUDE_pcTaskGetTaskName 1
|
||||
#define INCLUDE_xTaskGetIdleTaskHandle 1
|
||||
|
||||
#if CONFIG_ENABLE_MEMORY_DEBUG
|
||||
#define configENABLE_MEMORY_DEBUG 1
|
||||
#else
|
||||
#define configENABLE_MEMORY_DEBUG 0
|
||||
#endif
|
||||
|
||||
#define INCLUDE_xSemaphoreGetMutexHolder 1
|
||||
|
||||
/* The priority at which the tick interrupt runs. This should probably be
|
||||
|
||||
@@ -123,6 +123,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mpu_wrappers.h"
|
||||
#include "esp_system.h"
|
||||
|
||||
/*
|
||||
* Setup the stack of a new task so it is ready to be placed under the
|
||||
@@ -143,11 +144,10 @@ extern "C" {
|
||||
* non-FreeRTOS-specific code, and behave the same as
|
||||
* pvPortMalloc()/vPortFree().
|
||||
*/
|
||||
void *pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION;
|
||||
void vPortFree( void *pv ) PRIVILEGED_FUNCTION;
|
||||
void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;
|
||||
size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;
|
||||
size_t xPortGetMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION;
|
||||
#define pvPortMalloc malloc
|
||||
#define vPortFree free
|
||||
#define xPortGetFreeHeapSize esp_get_free_heap_size
|
||||
#define xPortGetMinimumEverFreeHeapSize esp_get_minimum_free_heap_size
|
||||
|
||||
/*
|
||||
* Setup the hardware ready for the scheduler to take control. This generally
|
||||
|
||||
@@ -382,30 +382,3 @@ void vPortSetStackWatchpoint( void* pxStackStart ) {
|
||||
uint32_t xPortGetTickRateHz(void) {
|
||||
return (uint32_t)configTICK_RATE_HZ;
|
||||
}
|
||||
|
||||
/* Heap functions, wrappers around heap_caps_xxx functions
|
||||
|
||||
NB: libc malloc() & free() are also defined & available
|
||||
for this purpose.
|
||||
*/
|
||||
|
||||
void *pvPortMalloc( size_t xWantedSize )
|
||||
{
|
||||
return heap_caps_malloc(xWantedSize, MALLOC_CAP_8BIT);
|
||||
}
|
||||
|
||||
void vPortFree( void *pv )
|
||||
{
|
||||
return heap_caps_free(pv);
|
||||
}
|
||||
|
||||
size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION
|
||||
{
|
||||
return heap_caps_get_free_size( MALLOC_CAP_8BIT );
|
||||
}
|
||||
|
||||
size_t xPortGetMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION
|
||||
{
|
||||
return heap_caps_get_minimum_free_size( MALLOC_CAP_8BIT );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user