otto
3d80117872
1. When shrinking a chunk allocation, compare the size of the current
allocation to the size of the new allocation (instead of the requested size). 2. Previously realloc takes the easy way and always reallocates if C is active. This commit fixes by carefully updating the recorded requested size in all cases, and writing the canary bytes in the proper location after reallocating. 3. Introduce defines to test if MALLOC_MOVE should be done and to compute the new value. |
7 years ago | |
---|---|---|
src | 1. When shrinking a chunk allocation, compare the size of the current | 7 years ago |