AP_HAL_ChibiOS: 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 429294fa1d
commit 64f6abd4d4
2 changed files with 3 additions and 3 deletions

View File

@ -96,7 +96,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

@ -48,7 +48,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;
@ -142,7 +142,7 @@ private:
FlashBootloader flash_bootloader() override;
#endif
#ifdef ENABLE_HEAP
#if ENABLE_HEAP
static memory_heap_t scripting_heap;
#endif // ENABLE_HEAP