]> git.saurik.com Git - apt.git/commitdiff
Not /not/ immediately mapping a file is INSANE :/.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 30 Jan 2017 17:03:52 +0000 (09:03 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 30 Jan 2017 17:03:52 +0000 (09:03 -0800)
apt-pkg/contrib/mmap.cc
apt-pkg/contrib/mmap.h

index 74870b404b3f3a9f1d23e72d99002bb84b16ba9b..4c58a096dc389895f3dba6f080d73baef7b61d48 100644 (file)
@@ -40,7 +40,6 @@
 MMap::MMap(FileFd &F,unsigned long Flags) : Flags(Flags), iSize(0),
                      Base(nullptr), SyncToFd(nullptr)
 {
-   if ((Flags & NoImmMap) != NoImmMap)
       Map(F);
 }
                                                                        /*}}}*/
@@ -217,7 +216,7 @@ bool MMap::Sync(unsigned long Start,unsigned long Stop)
 /* */
 DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long const &Workspace,
                         unsigned long const &Grow, unsigned long const &Limit) :
-               MMap(F,Flags | NoImmMap), Fd(&F), WorkSpace(Workspace),
+               MMap(Flags), Fd(&F), WorkSpace(Workspace),
                GrowFactor(Grow), Limit(Limit)
 {
    // disable Moveable if we don't grow
@@ -251,7 +250,7 @@ DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long const &Work
    and could come in handy later than we are able to grow such an mmap */
 DynamicMMap::DynamicMMap(unsigned long Flags,unsigned long const &WorkSpace,
                         unsigned long const &Grow, unsigned long const &Limit) :
-               MMap(Flags | NoImmMap | UnMapped), Fd(0), WorkSpace(WorkSpace),
+               MMap(Flags | UnMapped), Fd(0), WorkSpace(WorkSpace),
                GrowFactor(Grow), Limit(Limit)
 {
        // disable Moveable if we don't grow
index c1dfedf6da9b6b9d1244ec5c28414e95afc4cff1..1576cab91890fda3e829852350a965abc50ed369 100644 (file)
@@ -58,7 +58,7 @@ class MMap
    
    public:
 
-   enum OpenFlags {NoImmMap = (1<<0),Public = (1<<1),ReadOnly = (1<<2),
+   enum OpenFlags {Public = (1<<1),ReadOnly = (1<<2),
                    UnMapped = (1<<3), Moveable = (1<<4), Fallback = (1 << 5)};
       
    // Simple accessors