AP_HAL: implement standard realloc method

This commit is contained in:
bugobliterator 2020-03-16 18:21:16 +11:00 committed by Andrew Tridgell
parent 88de9572aa
commit c615bd9874
1 changed files with 2 additions and 0 deletions

View File

@ -159,8 +159,10 @@ public:
// heap functions, note that a heap once alloc'd cannot be dealloc'd
virtual void *allocate_heap_memory(size_t size) = 0;
virtual void *heap_realloc(void *heap, void *ptr, size_t new_size) = 0;
virtual void *std_realloc(void *ptr, size_t new_size) { return realloc(ptr, new_size); }
#endif // ENABLE_HEAP
/**
how much free memory do we have in bytes. If unknown return 4096
*/