libapt-pkg-dev  v0.9.7.5ubuntu5.4
Debian+Ubuntu APT Package Management
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DynamicMMap Class Reference

#include <mmap.h>

Inheritance diagram for DynamicMMap:
Collaboration diagram for DynamicMMap:

Classes

struct  Pool
 

Public Types

enum  OpenFlags {
  NoImmMap = (1<<0),
  Public = (1<<1),
  ReadOnly = (1<<2),
  UnMapped = (1<<3),
  Moveable = (1<<4),
  Fallback = (1 << 5)
}
 

Public Member Functions

 DynamicMMap (FileFd &F, unsigned long Flags, unsigned long const &WorkSpace=2 *1024 *1024, unsigned long const &Grow=1024 *1024, unsigned long const &Limit=0)
 
 DynamicMMap (unsigned long Flags, unsigned long const &WorkSpace=2 *1024 *1024, unsigned long const &Grow=1024 *1024, unsigned long const &Limit=0)
 
virtual ~DynamicMMap ()
 
void AddSize (unsigned long long const size)
 
unsigned long Allocate (unsigned long ItemSize)
 
void * Data ()
 
 operator void * ()
 
unsigned long RawAllocate (unsigned long long Size, unsigned long Aln=0)
 
unsigned long long Size ()
 
bool Sync ()
 
bool Sync (unsigned long Start, unsigned long Stop)
 
void UsePools (Pool &P, unsigned int Count)
 
bool validData () const
 
unsigned long WriteString (const char *String, unsigned long Len=(unsigned long)-1)
 
unsigned long WriteString (const std::string &S)
 

Protected Member Functions

bool Close (bool DoSync=true)
 
bool Grow ()
 
bool Map (FileFd &Fd)
 

Protected Attributes

void * Base
 
FileFdFd
 
unsigned long Flags
 
unsigned long const GrowFactor
 
unsigned long long iSize
 
unsigned long const Limit
 
unsigned int PoolCount
 
PoolPools
 
FileFdSyncToFd
 
unsigned long WorkSpace
 

Member Enumeration Documentation

enum MMap::OpenFlags
inherited
Enumerator
NoImmMap 
Public 
ReadOnly 
UnMapped 
Moveable 
Fallback 

Constructor & Destructor Documentation

DynamicMMap::DynamicMMap ( FileFd F,
unsigned long  Flags,
unsigned long const &  WorkSpace = 2 *1024 *1024,
unsigned long const &  Grow = 1024 *1024,
unsigned long const &  Limit = 0 
)
DynamicMMap::DynamicMMap ( unsigned long  Flags,
unsigned long const &  WorkSpace = 2 *1024 *1024,
unsigned long const &  Grow = 1024 *1024,
unsigned long const &  Limit = 0 
)
virtual DynamicMMap::~DynamicMMap ( )
virtual

Member Function Documentation

void MMap::AddSize ( unsigned long long const  size)
inlineinherited

References MMap::iSize.

unsigned long DynamicMMap::Allocate ( unsigned long  ItemSize)
bool MMap::Close ( bool  DoSync = true)
protectedinherited
void* MMap::Data ( )
inlineinherited

References MMap::Base.

Referenced by pkgCache::DataEnd().

Here is the caller graph for this function:

bool DynamicMMap::Grow ( )
protected
bool MMap::Map ( FileFd Fd)
protectedinherited
MMap::operator void * ( )
inlineinherited

References MMap::Base.

unsigned long DynamicMMap::RawAllocate ( unsigned long long  Size,
unsigned long  Aln = 0 
)
unsigned long long MMap::Size ( )
inlineinherited

References MMap::iSize.

Referenced by pkgCache::DataEnd().

Here is the caller graph for this function:

bool MMap::Sync ( )
inherited

Referenced by pkgCache::Sync().

Here is the caller graph for this function:

bool MMap::Sync ( unsigned long  Start,
unsigned long  Stop 
)
inherited
void DynamicMMap::UsePools ( Pool P,
unsigned int  Count 
)
inline

References PoolCount, and Pools.

bool MMap::validData ( ) const
inlineinherited

References MMap::Base.

unsigned long DynamicMMap::WriteString ( const char *  String,
unsigned long  Len = (unsigned long)-1 
)
unsigned long DynamicMMap::WriteString ( const std::string &  S)
inline

References WriteString().

Referenced by WriteString().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

void* MMap::Base
protectedinherited
FileFd* DynamicMMap::Fd
protected
unsigned long MMap::Flags
protectedinherited
unsigned long const DynamicMMap::GrowFactor
protected
unsigned long long MMap::iSize
protectedinherited

Referenced by MMap::AddSize(), and MMap::Size().

unsigned long const DynamicMMap::Limit
protected
unsigned int DynamicMMap::PoolCount
protected

Referenced by UsePools().

Pool* DynamicMMap::Pools
protected

Referenced by UsePools().

FileFd* MMap::SyncToFd
protectedinherited
unsigned long DynamicMMap::WorkSpace
protected

The documentation for this class was generated from the following file: