mirror of https://github.com/ArduPilot/ardupilot
AP_HAL_Linux: switched ENABLE_HEAP to an #if
This commit is contained in:
parent
f235b71f6b
commit
3980cbbb82
|
@ -241,7 +241,7 @@ int Util::get_hw_arm32()
|
|||
return -ENOENT;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_HEAP
|
||||
#if ENABLE_HEAP
|
||||
void *Util::allocate_heap_memory(size_t size)
|
||||
{
|
||||
struct heap *new_heap = (struct heap*)malloc(sizeof(struct heap));
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
bool get_system_id(char buf[50]) override;
|
||||
bool get_system_id_unformatted(uint8_t buf[], uint8_t &len) 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 *h, void *ptr, size_t old_size, size_t new_size) override;
|
||||
|
@ -116,7 +116,7 @@ private:
|
|||
const char *custom_defaults = HAL_PARAM_DEFAULTS_PATH;
|
||||
static const char *_hw_names[UTIL_NUM_HARDWARES];
|
||||
|
||||
#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