Overwrite allocated buffer to catch errors when deallocating in case a control block was overwritten.

This commit is contained in:
Ion Gaztañaga
2024-08-17 23:50:30 +02:00
parent 8deafaa3f3
commit bb105ba72b

View File

@@ -417,6 +417,7 @@ bool test_aligned_allocation(Allocator &a)
if(((std::size_t)ptr & (j - 1)) != 0)
return false;
std::memset(ptr, 0xFF, i - 1);
a.deallocate(ptr);
if(!a.all_memory_deallocated() || !a.check_sanity()){
return false;