diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2009-11-25 18:15:36 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2009-11-25 18:15:36 +0100 |
commit | 3aa695e3e07925d89bae59e0890f1f3b55b9e15a (patch) | |
tree | a868ba08cf10ba3dbba07059855943a50e7e8e89 /apt-pkg/contrib/mmap.h | |
parent | 49012e99a80a08925e4ad9911308c1c1b5cb33fb (diff) | |
parent | baef9c95ed1b03e13ab6f61fc2e166169d7710a8 (diff) |
merge my rred-rewrite branch & add it's changes to the changelog
Diffstat (limited to 'apt-pkg/contrib/mmap.h')
-rw-r--r-- | apt-pkg/contrib/mmap.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index bde62217d..cd2b15ba2 100644 --- a/apt-pkg/contrib/mmap.h +++ b/apt-pkg/contrib/mmap.h @@ -50,7 +50,7 @@ class MMap public: enum OpenFlags {NoImmMap = (1<<0),Public = (1<<1),ReadOnly = (1<<2), - UnMapped = (1<<3)}; + UnMapped = (1<<3), Moveable = (1<<4), Fallback = (1 << 5)}; // Simple accessors inline operator void *() {return Base;}; @@ -82,6 +82,8 @@ class DynamicMMap : public MMap FileFd *Fd; unsigned long WorkSpace; + unsigned long const GrowFactor; + unsigned long const Limit; Pool *Pools; unsigned int PoolCount; @@ -96,8 +98,10 @@ class DynamicMMap : public MMap inline unsigned long WriteString(const string &S) {return WriteString(S.c_str(),S.length());}; void UsePools(Pool &P,unsigned int Count) {Pools = &P; PoolCount = Count;}; - DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace = 2*1024*1024); - DynamicMMap(unsigned long Flags,unsigned long WorkSpace = 2*1024*1024); + 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(); }; |