mirror of https://github.com/ArduPilot/ardupilot
AP_HAL_SITL: switched ENABLE_HEAP to an #if
This commit is contained in:
parent
3980cbbb82
commit
393cd3252b
|
@ -85,7 +85,7 @@ bool HALSITL::Util::get_system_id(char buf[50])
|
|||
return get_system_id_unformatted((uint8_t *)buf, len);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_HEAP
|
||||
#if ENABLE_HEAP
|
||||
void *HALSITL::Util::allocate_heap_memory(size_t size)
|
||||
{
|
||||
struct heap *new_heap = (struct heap*)malloc(sizeof(struct heap));
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
bool get_system_id_unformatted(uint8_t buf[], uint8_t &len) override;
|
||||
void dump_stack_trace();
|
||||
|
||||
#ifdef ENABLE_HEAP
|
||||
#if ENABLE_HEAP
|
||||
// heap functions, note that a heap once alloc'd cannot be dealloc'd
|
||||
void *allocate_heap_memory(size_t size) override;
|
||||
void *heap_realloc(void *heap, void *ptr, size_t old_size, size_t new_size) override;
|
||||
|
@ -90,7 +90,7 @@ private:
|
|||
static ToneAlarm_SF _toneAlarm;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_HEAP
|
||||
#if ENABLE_HEAP
|
||||
struct heap_allocation_header {
|
||||
size_t allocation_size; // size of allocated block, not including this header
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue