예제 #1
0
/*
  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);
}
예제 #2
0
EXPORT void operator delete(void *address) throw()
{
	doDeallocate( address );
}
예제 #3
0
EXPORT void operator delete[](void *address, const std::nothrow_t&) throw()
{
	doDeallocate( address );
}