mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 12:10:59 +00:00
refactor(heap): decouple heap_init from esp_system
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -14,11 +14,19 @@
|
||||
#include "esp_heap_caps_init.h"
|
||||
#include "heap_memory_layout.h"
|
||||
|
||||
#include "esp_private/startup_internal.h"
|
||||
|
||||
static const char *TAG = "heap_init";
|
||||
|
||||
/* Linked-list of registered heaps */
|
||||
struct registered_heap_ll registered_heaps;
|
||||
|
||||
ESP_SYSTEM_INIT_FN(init_heap, CORE, BIT(0), 100)
|
||||
{
|
||||
heap_caps_init();
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static void register_heap(heap_t *region)
|
||||
{
|
||||
size_t heap_size = region->end - region->start;
|
||||
|
Reference in New Issue
Block a user