system-alloc.cc

#include "config.h"
#include <stdint.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/resource.h>
#include <errno.h>
#include "system-alloc.h"
#include "internal_logging.h"
#include "base/logging.h"
#include "base/commandlineflags.h"
#include "base/spinlock.h"

tcmalloc-0.93/system-alloc.ccのインクルード依存関係図

ソースコードを見る。

構成

union  MemoryAligner
class  SbrkSysAllocator
class  MmapSysAllocator
class  DevMemSysAllocator

マクロ定義

#define MAP_ANONYMOUS   MAP_ANON

関数

 DEFINE_int32 (malloc_devmem_start, 0,"Physical memory starting location in MB for /dev/mem allocation."" Setting this to 0 disables /dev/mem allocation")
 DEFINE_int32 (malloc_devmem_limit, 0,"Physical memory limit location in MB for /dev/mem allocation."" Setting this to 0 means no limit.")
bool RegisterSystemAllocator (SysAllocator *a, int priority)
void InitSystemAllocators (void)
void * TCMalloc_SystemAlloc (size_t size, size_t *actual_size, size_t alignment)
void TCMalloc_SystemRelease (void *start, size_t length)

変数

static SpinLock spinlock (SpinLock::LINKER_INITIALIZED)
static size_t pagesize = 0
static char sbrk_space [sizeof(SbrkSysAllocator)]
static char mmap_space [sizeof(MmapSysAllocator)]
static char devmem_space [sizeof(DevMemSysAllocator)]
static const int kStaticAllocators = 3
static const int kMaxAllocators = 5
SysAllocatorallocators [kMaxAllocators]
static bool system_alloc_inited = false


マクロ定義

#define MAP_ANONYMOUS   MAP_ANON

tcmalloc-0.93/system-alloc.cc59 行で定義されています。

参照元 MmapSysAllocator::Alloc().


関数

DEFINE_int32 ( malloc_devmem_limit  ,
,
"Physical memory limit location in MB for /dev/mem allocation."" Setting this to 0 means no limit."   
)

DEFINE_int32 ( malloc_devmem_start  ,
,
"Physical memory starting location in MB for /dev/mem allocation."" Setting this to 0 disables /dev/mem allocation"   
)

void InitSystemAllocators ( void   ) 

bool RegisterSystemAllocator ( SysAllocator a,
int  priority 
)

tcmalloc-0.93/system-alloc.cc125 行で定義されています。

参照先 CHECK, と spinlock.

void* TCMalloc_SystemAlloc ( size_t  size,
size_t *  actual_size,
size_t  alignment 
)

void TCMalloc_SystemRelease ( void *  start,
size_t  length 
)

tcmalloc-0.93/system-alloc.cc389 行で定義されています。

参照先 ASSERT, と pagesize.

参照元 TCMalloc_PageHeap::IncrementalScavenge(), と ReleaseFreeList().


変数

tcmalloc-0.93/system-alloc.cc123 行で定義されています。

char devmem_space[sizeof(DevMemSysAllocator)] [static]

tcmalloc-0.93/system-alloc.cc118 行で定義されています。

参照元 InitSystemAllocators().

const int kMaxAllocators = 5 [static]

tcmalloc-0.93/system-alloc.cc122 行で定義されています。

参照元 TCMalloc_SystemAlloc().

const int kStaticAllocators = 3 [static]

tcmalloc-0.93/system-alloc.cc120 行で定義されています。

char mmap_space[sizeof(MmapSysAllocator)] [static]

tcmalloc-0.93/system-alloc.cc110 行で定義されています。

参照元 InitSystemAllocators().

size_t pagesize = 0 [static]

tcmalloc-0.93/system-alloc.cc79 行で定義されています。

char sbrk_space[sizeof(SbrkSysAllocator)] [static]

tcmalloc-0.93/system-alloc.cc102 行で定義されています。

参照元 InitSystemAllocators().

SpinLock spinlock(SpinLock::LINKER_INITIALIZED) [static]

bool system_alloc_inited = false [static]

tcmalloc-0.93/system-alloc.cc326 行で定義されています。

参照元 TCMalloc_SystemAlloc().


Thu Oct 8 05:01:13 2009に生成されました。  doxygen 1.5.6