The unified diff between revisions [67768644..] and [44833339..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'src/mem_pool.cpp'
#
#
# patch "src/mem_pool.cpp"
# from [c5183d5071d05861650892a85af9a3aac95221c5]
# to [0a6884046e969b8d9b409a276adce4474ca3b921]
#
============================================================
--- src/mem_pool.cpp c5183d5071d05861650892a85af9a3aac95221c5
+++ src/mem_pool.cpp 0a6884046e969b8d9b409a276adce4474ca3b921
@@ -42,16 +42,6 @@ Pooling_Allocator::Memory_Block::Memory_
}
/*************************************************
-* Compare a Memory_Block with a void pointer *
-*************************************************/
-inline bool Pooling_Allocator::Memory_Block::operator<(const void* other) const
- {
- if(buffer <= other && other < buffer_end)
- return false;
- return (buffer < other);
- }
-
-/*************************************************
* See if ptr is contained by this block *
*************************************************/
bool Pooling_Allocator::Memory_Block::contains(void* ptr,
@@ -207,7 +197,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");