mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_HAL_ChibiOS: switched ENABLE_HEAP to an #if
This commit is contained in:
parent
429294fa1d
commit
64f6abd4d4
@ -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)
|
void *Util::allocate_heap_memory(size_t size)
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ public:
|
|||||||
void *malloc_type(size_t size, AP_HAL::Util::Memory_Type mem_type) override;
|
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;
|
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
|
// heap functions, note that a heap once alloc'd cannot be dealloc'd
|
||||||
virtual void *allocate_heap_memory(size_t size) override;
|
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;
|
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;
|
FlashBootloader flash_bootloader() override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_HEAP
|
#if ENABLE_HEAP
|
||||||
static memory_heap_t scripting_heap;
|
static memory_heap_t scripting_heap;
|
||||||
#endif // ENABLE_HEAP
|
#endif // ENABLE_HEAP
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user