cvmfs/sqlitemem.cc
uint32_t SqliteMemoryManager::MallocArena::GetSize(void *ptr) const {
  assert(Contains(ptr));

  ReservedBlockCtl *block_ctl = reinterpret_cast<ReservedBlockCtl *>(
    reinterpret_cast<char *>(ptr) - sizeof(ReservedBlockCtl));
  int32_t size = block_ctl->size();
  assert(size > 1);
  return size - sizeof(ReservedBlockCtl) - 1;
}
/**
 * The ptr points to the result of Malloc().  The size of the area is stored
 * a few bytes before ptr.
 */
The ptr points to the result of Malloc().  The size of the area is stored
a few bytes before ptr.
The ptr points to the result of Malloc () . The size of the area is stored a few bytes before ptr .
uint32_t SqliteMemoryManager::MallocArena::GetSize(void *ptr) const {
  assert(Contains(ptr));
  ReservedBlockCtl *block_ctl = reinterpret_cast<ReservedBlockCtl *>(
    reinterpret_cast<char *>(ptr) - sizeof(ReservedBlockCtl));
  int32_t size = block_ctl->size();
  assert(size > 1);
  return size - sizeof(ReservedBlockCtl) - 1;
}
uint32_t SqliteMemoryManager :: MallocArena :: GetSize ( void * ptr ) const { assert ( Contains ( ptr ) ) ; ReservedBlockCtl * block_ctl = reinterpret_cast < ReservedBlockCtl * > ( reinterpret_cast < char * > ( ptr ) - sizeof ( ReservedBlockCtl ) ) ; int32_t size = block_ctl -> size ( ) ; assert ( size > 1 ) ; return size - sizeof ( ReservedBlockCtl ) - 1 ; }
The ptr points to the result of Malloc().
The ptr points to the result of Malloc () .