summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2010-07-09 21:54:02 +0200
committerMichael Vogt <mvo@debian.org>2010-07-09 21:54:02 +0200
commit68f3081559998a0b2b1ddcaf80a8cf0e46658483 (patch)
treebb53b6c174fbf850f0e9b9ee303de9130b49739d /apt-pkg/pkgcachegen.h
parent5d062ce08e6125d9ef34d3e55d4a88c1937f4f21 (diff)
parent62d073d937742baf8621a11c3094e0320aa846cd (diff)
* doc/apt.conf.5.xml:
- add and document APT::Cache-{Start,Grow,Limit} options for mmap control
Diffstat (limited to 'apt-pkg/pkgcachegen.h')
-rw-r--r--apt-pkg/pkgcachegen.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index 3bee1f958..ff198833a 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -23,7 +23,7 @@
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/md5.h>
-#include <set>
+#include <vector>
class pkgSourceList;
class OpProgress;
@@ -46,16 +46,14 @@ class pkgCacheGenerator /*{{{*/
friend class ListParser;
template<typename Iter> class Dynamic {
- Iter *I;
-
public:
- static std::set<Iter*> toReMap;
- Dynamic(Iter &It) : I(&It) {
- toReMap.insert(I);
+ static std::vector<Iter*> toReMap;
+ Dynamic(Iter &I) {
+ toReMap.push_back(&I);
}
~Dynamic() {
- toReMap.erase(I);
+ toReMap.pop_back();
}
};
@@ -101,6 +99,7 @@ class pkgCacheGenerator /*{{{*/
static bool MakeStatusCache(pkgSourceList &List,OpProgress *Progress,
MMap **OutMap = 0,bool AllowMem = false);
static bool MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap);
+ static DynamicMMap* CreateDynamicMMap(FileFd *CacheF, unsigned long Flags = 0);
void ReMap(void const * const oldMap, void const * const newMap);