diff options
author | lloyd <[email protected]> | 2007-04-25 23:29:56 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-04-25 23:29:56 +0000 |
commit | 461d575c67fd54f3ad9146720b44242e53aa81bd (patch) | |
tree | acdfb87e14f5c349efe9e81675a051b810dafd37 /src | |
parent | 0466f2522f6bfda4527507320257fc4b1339ba55 (diff) | |
parent | 454d4d7edc20c10ed7219f45698486902bba4880 (diff) |
propagate from branch 'net.randombit.botan.stable' (head 8a2b79c64a13d3f70b0211d4f985a678951a9663)
to branch 'net.randombit.botan' (head 677686443a5bb53b03d147999947448a9dc2679a)
Diffstat (limited to 'src')
-rw-r--r-- | src/mem_pool.cpp | 12 |
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"); |