AP_HAL: added old_size to heap_realloc

This commit is contained in:
Andrew Tridgell 2022-12-23 09:50:37 +11:00
parent e255bbbd40
commit 13cbccc016

View File

@ -153,7 +153,7 @@ public:
#ifdef ENABLE_HEAP #ifdef 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) = 0; virtual void *allocate_heap_memory(size_t size) = 0;
virtual void *heap_realloc(void *heap, void *ptr, size_t new_size) = 0; virtual void *heap_realloc(void *heap, void *ptr, size_t old_size, size_t new_size) = 0;
#if USE_LIBC_REALLOC #if USE_LIBC_REALLOC
virtual void *std_realloc(void *ptr, size_t new_size) { return realloc(ptr, new_size); } virtual void *std_realloc(void *ptr, size_t new_size) { return realloc(ptr, new_size); }
#else #else