mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
Try to merge tail with next block when splitting
When splitting a memory block, check if the next block is free. If it is, then just extend it upwards instead of creating a new block. This fixes a bug where when shrinking existing allocations would result in irreversible free space fragmentation. When testing on the host, test all the poisoning configurations.
This commit is contained in:

committed by
Angus Gratton

parent
393f3da37c
commit
4b7eb1792e
@@ -14,8 +14,8 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#endif
|
||||
|
||||
/* Configuration macros for multi-heap */
|
||||
|
||||
@@ -27,11 +27,3 @@
|
||||
#define MULTI_HEAP_POISONING
|
||||
#define MULTI_HEAP_POISONING_SLOW
|
||||
#endif
|
||||
|
||||
#else /* !ESP_PLATFORM */
|
||||
|
||||
/* Host-side tests, enable full poisoning */
|
||||
#define MULTI_HEAP_POISONING
|
||||
#define MULTI_HEAP_POISONING_SLOW
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user