Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

SAPDB_ULong LVCMem_BlockAllocator::CalcBlockCount ( SAPDB_ULong  NumberOfBytes  )  const [virtual]

Returns the number of blocks needed to allocate given number of bytes.

Since Allocate() needs the number of blocks instead of number of bytes, this helper routine exists to calculate the right argument. When used calling the Routine GetBlockSize() is not needed.

Parameters:
NumberOfBytes [in] Number of bytes instead of number of blocks
Returns:
value The number of system memory page needed for given number of bytes

Implements SAPDBMem_IBlockAllocator.

Definition at line 127 of file LVCMem_BlockAllocator.cpp.

References SAPDBMem_IBlockAllocator::CalcBlockCount(), and m_allocator.

Referenced by SetLimit().

{
  return m_allocator.CalcBlockCount(NumberOfBytes);
}


Generated by  Doxygen 1.6.0   Back to index