Skip to content

Commit bb105ba

Browse files
committed
Overwrite allocated buffer to catch errors when deallocating in case a control block was overwritten.
1 parent 8deafaa commit bb105ba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/memory_algorithm_test_template.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ bool test_aligned_allocation(Allocator &a)
417417

418418
if(((std::size_t)ptr & (j - 1)) != 0)
419419
return false;
420+
std::memset(ptr, 0xFF, i - 1);
420421
a.deallocate(ptr);
421422
if(!a.all_memory_deallocated() || !a.check_sanity()){
422423
return false;

0 commit comments

Comments
 (0)