The unified diff between revisions [63c067b5..] and [4ca04bcf..] is displayed below. It can also be downloaded as a raw diff.
#
#
# patch "src/mem_pool.cpp"
# from [30a492cf1f8d730a82c358b2f9e8d6455ae1c97a]
# to [21952be0c629a027832328f507aabe362e3d9938]
#
============================================================
--- src/mem_pool.cpp 30a492cf1f8d730a82c358b2f9e8d6455ae1c97a
+++ src/mem_pool.cpp 21952be0c629a027832328f507aabe362e3d9938
@@ -207,7 +207,7 @@ void Pooling_Allocator::deallocate(void*
const u32bit block_no = round_up(n, BLOCK_SIZE) / BLOCK_SIZE;
std::vector<Memory_Block>::iterator i =
- std::lower_bound(blocks.begin(), blocks.end(), ptr);
+ std::lower_bound(blocks.begin(), blocks.end(), Memory_Block(ptr));
if(i == blocks.end() || !i->contains(ptr, block_no))
throw Invalid_State("Pointer released to the wrong allocator");
@@ -270,7 +270,8 @@ void Pooling_Allocator::get_more_core(u3
}
std::sort(blocks.begin(), blocks.end());
- last_used = std::lower_bound(blocks.begin(), blocks.end(), ptr);
+ last_used = std::lower_bound(blocks.begin(), blocks.end(),
+ Memory_Block(ptr));
}
}