old_api.cc File Reference
#include "squid.h"
#include "base/PackableStream.h"
#include "ClientInfo.h"
#include "dlink.h"
#include "event.h"
#include "fs_io.h"
#include "icmp/net_db.h"
#include "md5.h"
#include "mem/forward.h"
#include "mem/Meter.h"
#include "mem/Pool.h"
#include "MemBuf.h"
#include "mgr/Registration.h"
#include "SquidConfig.h"
#include "SquidTime.h"
#include "Store.h"
#include <iomanip>
Include dependency graph for old_api.cc:

Go to the source code of this file.

Classes

struct  PoolMeta
 

Macros

#define mem_str_pool_count   6
 

Functions

static void memFree2K (void *)
 
static void memFree4K (void *)
 
static void memFree8K (void *)
 
static void memFree16K (void *)
 
static void memFree32K (void *)
 
static void memFree64K (void *)
 
static void memStringStats (std::ostream &)
 
static MemAllocator *& GetPool (size_t type)
 
static MemAllocatorGetStrPool (size_t type)
 
static mem_type memFindStringSizeType (size_t net_size, bool fuzzy)
 
static void memBufStats (std::ostream &stream)
 
void memDataInit (mem_type type, const char *name, size_t size, int, bool doZero)
 
void * memAllocate (mem_type type)
 Allocate one element from the typed pool. More...
 
void memFree (void *p, int type)
 Free a element allocated by memAllocate() More...
 
void * memAllocString (size_t net_size, size_t *gross_size)
 
size_t memStringCount ()
 
void memFreeString (size_t size, void *buf)
 
static mem_type memFindBufSizeType (size_t net_size, size_t *gross_size)
 
void * memAllocBuf (size_t net_size, size_t *gross_size)
 
void * memReallocBuf (void *oldbuf, size_t net_size, size_t *gross_size)
 
void memFreeBuf (size_t size, void *buf)
 
void memConfigure (void)
 
mem_typeoperator++ (mem_type &aMem)
 
void memCheckInit (void)
 
void memClean (void)
 Main cleanup handler. More...
 
int memInUse (mem_type type)
 
static void cxx_xfree (void *ptr)
 
FREEmemFreeBufFunc (size_t size)
 
static int MemPoolReportSorter (const void *a, const void *b)
 

Variables

static double xm_time = 0
 
static double xm_deltat = 0
 
static Mem::Meter StrCountMeter
 
static Mem::Meter StrVolumeMeter
 
static Mem::Meter HugeBufCountMeter
 
static Mem::Meter HugeBufVolumeMeter
 
static double clean_interval = 15.0
 

Macro Definition Documentation

#define mem_str_pool_count   6

Definition at line 46 of file old_api.cc.

Referenced by GetStrPool(), memFindStringSizeType(), memStringCount(), and memStringStats().

Function Documentation

static void cxx_xfree ( void *  ptr)
static

Definition at line 546 of file old_api.cc.

References xfree.

Referenced by memFreeBufFunc().

static MemAllocator*& GetPool ( size_t  type)
static

Definition at line 64 of file old_api.cc.

References Mem::Init(), MEM_MAX, and type.

Referenced by Mem::Init(), memAllocate(), memCheckInit(), memDataInit(), memFree(), and memInUse().

static MemAllocator& GetStrPool ( size_t  type)
static
void* memAllocate ( mem_type  type)

Definition at line 219 of file old_api.cc.

References MemAllocator::alloc(), assert, and GetPool().

Referenced by memAllocBuf().

void* memAllocBuf ( size_t  net_size,
size_t gross_size 
)

Definition at line 320 of file old_api.cc.

References HugeBufCountMeter, MEM_NONE, memAllocate(), memFindBufSizeType(), type, and xcalloc.

Referenced by memReallocBuf().

void* memAllocString ( size_t  net_size,
size_t gross_size 
)

Definition at line 235 of file old_api.cc.

References assert, GetStrPool(), MEM_NONE, memFindStringSizeType(), StrCountMeter, type, and xcalloc.

static void memBufStats ( std::ostream &  stream)
static

Definition at line 163 of file old_api.cc.

References Mem::Meter::currentLevel().

Referenced by Mem::Stats().

void memCheckInit ( void  )

Definition at line 473 of file old_api.cc.

References assert, GetPool(), MEM_MAX, and MEM_NONE.

void memConfigure ( void  )
void memDataInit ( mem_type  type,
const char *  name,
size_t  size,
int  ,
bool  doZero 
)

Definition at line 206 of file old_api.cc.

References assert, GetPool(), memPoolCreate, NULL, and MemAllocator::zeroBlocks().

Referenced by Mem::Init().

static mem_type memFindBufSizeType ( size_t  net_size,
size_t gross_size 
)
static

Definition at line 284 of file old_api.cc.

References MEM_16K_BUF, MEM_2K_BUF, MEM_32K_BUF, MEM_4K_BUF, MEM_64K_BUF, MEM_8K_BUF, MEM_NONE, size, and type.

Referenced by memAllocBuf(), and memFreeBuf().

static mem_type memFindStringSizeType ( size_t  net_size,
bool  fuzzy 
)
static

Definition at line 118 of file old_api.cc.

References GetStrPool(), i, MEM_NONE, mem_str_pool_count, and type.

Referenced by memAllocString(), and memFreeString().

void memFree ( void *  p,
int  type 
)
void memFree16K ( void *  p)
static

Definition at line 528 of file old_api.cc.

References MEM_16K_BUF, and memFree().

Referenced by memFreeBufFunc().

void memFree2K ( void *  p)
static

Definition at line 510 of file old_api.cc.

References MEM_2K_BUF, and memFree().

Referenced by memFreeBufFunc().

void memFree32K ( void *  p)
static

Definition at line 534 of file old_api.cc.

References MEM_32K_BUF, and memFree().

Referenced by memFreeBufFunc().

void memFree4K ( void *  p)
static

Definition at line 516 of file old_api.cc.

References MEM_4K_BUF, and memFree().

Referenced by memFreeBufFunc().

void memFree64K ( void *  p)
static

Definition at line 540 of file old_api.cc.

References MEM_64K_BUF, and memFree().

Referenced by memFreeBufFunc().

void memFree8K ( void *  p)
static

Definition at line 522 of file old_api.cc.

References MEM_8K_BUF, and memFree().

Referenced by memFreeBufFunc().

void memFreeBuf ( size_t  size,
void *  buf 
)

Definition at line 359 of file old_api.cc.

References HugeBufCountMeter, MEM_NONE, memFindBufSizeType(), memFree(), NULL, size, type, and xfree.

Referenced by memReallocBuf().

FREE* memFreeBufFunc ( size_t  size)
void memFreeString ( size_t  size,
void *  buf 
)
int memInUse ( mem_type  type)

Definition at line 502 of file old_api.cc.

References GetPool(), and MemAllocator::inUseCount().

static int MemPoolReportSorter ( const void *  a,
const void *  b 
)
static
void* memReallocBuf ( void *  oldbuf,
size_t  net_size,
size_t gross_size 
)

Definition at line 335 of file old_api.cc.

References memAllocBuf(), and memFreeBuf().

size_t memStringCount ( )

Definition at line 256 of file old_api.cc.

References GetStrPool(), MemAllocator::inUseCount(), and mem_str_pool_count.

static void memStringStats ( std::ostream &  stream)
static

Definition at line 136 of file old_api.cc.

References Mem::Meter::currentLevel(), GetStrPool(), i, mem_str_pool_count, and xpercentInt().

Referenced by Mem::Stats().

mem_type& operator++ ( mem_type aMem)

Definition at line 462 of file old_api.cc.

References int.

Variable Documentation

double clean_interval = 15.0
static

Definition at line 372 of file old_api.cc.

Referenced by Mem::CleanIdlePools().

Mem::Meter HugeBufCountMeter
static

Definition at line 56 of file old_api.cc.

Referenced by memAllocBuf(), memFreeBuf(), and memFreeBufFunc().

Mem::Meter HugeBufVolumeMeter
static

Definition at line 57 of file old_api.cc.

Mem::Meter StrCountMeter
static

Definition at line 53 of file old_api.cc.

Referenced by memAllocString(), and memFreeString().

Mem::Meter StrVolumeMeter
static

Definition at line 54 of file old_api.cc.

double xm_deltat = 0
static

Definition at line 43 of file old_api.cc.

Referenced by DumpMallocStatistics(), Mem::PoolReport(), and Mem::Report().

double xm_time = 0
static

Definition at line 42 of file old_api.cc.

Referenced by DumpMallocStatistics(), and Mem::Report().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors