summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/mmap.cc
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/contrib/mmap.cc
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/contrib/mmap.cc')
-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;