aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-04-25 23:30:49 +0000
committerlloyd <[email protected]>2007-04-25 23:30:49 +0000
commit961da256fc018bb9e695f14b22de27829cd39c5e (patch)
treea6026a16f45bdf05bd099e584a16ae8704b18d80
parent0466f2522f6bfda4527507320257fc4b1339ba55 (diff)
Fix the merge
-rw-r--r--src/mem_pool.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mem_pool.cpp b/src/mem_pool.cpp
index 67da88a14..faf399ec6 100644
--- a/src/mem_pool.cpp
+++ b/src/mem_pool.cpp
@@ -42,16 +42,6 @@ Pooling_Allocator::Memory_Block::Memory_Block(void* buf)
}
/*************************************************
-* 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* ptr, u32bit n)
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");