summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-07-09 17:00:28 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-07-09 17:00:28 +0200
commitdcdf1ef18b37c243fc707869149f7761d964915c (patch)
treed9eeb86dc270317730c3de411e0df2558354942b /apt-pkg/contrib
parenta9fe592842bfa17d91f4904d7fb0e3af3adebb17 (diff)
* doc/apt.conf.5.xml:
- add and document APT::Cache-{Start,Grow,Limit} options for mmap control
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/mmap.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc
index aa184b130..69fb61fca 100644
--- a/apt-pkg/contrib/mmap.cc
+++ b/apt-pkg/contrib/mmap.cc
@@ -398,6 +398,8 @@ bool DynamicMMap::Grow() {
if (Limit != 0 && WorkSpace >= Limit)
return _error->Error(_("Unable to increase the size of the MMap as the "
"limit of %lu bytes is already reached."), Limit);
+ if (GrowFactor <= 0)
+ return _error->Error(_("Unable to increase size of the MMap as automatic growing is disabled by user."));
unsigned long const newSize = WorkSpace + GrowFactor;