/* deallocate a memory block previsously allocated with allocate() (if that's not the case, the behaviour is undefined) //*/ void FixedAllocator::deallocate(void* ptr) { std::cout << "\t\t\tFixedAllocator::deallocate(void* ptr)\n"; assert( !chunks_.empty()); assert( &chunks_.front() <= deallocChunk_); assert( &chunks_.back() >= deallocChunk_); // find Chunk deallocChunk_ = vicinityFind( ptr); // check if Chunk was NOT empty assert( deallocChunk_); // call doDeallocate() doDeallocate( ptr); }
EXPORT void operator delete(void *address) throw() { doDeallocate( address ); }
EXPORT void operator delete[](void *address, const std::nothrow_t&) throw() { doDeallocate( address ); }