AP_HAL_ESP32: switched ENABLE_HEAP to an #if

This commit is contained in:
Andrew Tridgell 2024-07-06 09:05:51 +10:00 committed by Peter Barker
parent 64f6abd4d4
commit 15ef6b1192
2 changed files with 3 additions and 3 deletions

View File

@ -90,7 +90,7 @@ void Util::free_type(void *ptr, size_t size, AP_HAL::Util::Memory_Type mem_type)
}
#ifdef ENABLE_HEAP
#if ENABLE_HEAP
void *Util::allocate_heap_memory(size_t size)
{

View File

@ -34,7 +34,7 @@ public:
void *malloc_type(size_t size, AP_HAL::Util::Memory_Type mem_type) override;
void free_type(void *ptr, size_t size, AP_HAL::Util::Memory_Type mem_type) override;
#ifdef ENABLE_HEAP
#if ENABLE_HEAP
// heap functions, note that a heap once alloc'd cannot be dealloc'd
virtual void *allocate_heap_memory(size_t size) override;
virtual void *heap_realloc(void *heap, void *ptr, size_t old_size, size_t new_size) override;
@ -85,7 +85,7 @@ private:
FlashBootloader flash_bootloader() override;
#endif
#ifdef ENABLE_HEAP
#if ENABLE_HEAP
// static memory_heap_t scripting_heap;
#endif // ENABLE_HEAP