From 9b9a60aa892df399b64984c79c9cedd42a38432d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 13 Dec 2010 19:11:48 +0900 Subject: [PATCH] Make the -mem suggestion a little more realistic. 16M hasn't been enough for a long time. --- libs/util/zone.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/util/zone.c b/libs/util/zone.c index cceb1c878..ada54172b 100644 --- a/libs/util/zone.c +++ b/libs/util/zone.c @@ -451,10 +451,13 @@ Hunk_AllocName (int size, const char *name) Cache_FreeLRU (); } if (hunk_size - hunk_low_used - hunk_high_used < size) { + int mem = hunk_size / (1024 * 1024); + mem += 8; + mem &= ~7; Cache_Profile (); Sys_Error - ("Not enough RAM allocated. Try starting using \"-mem 16\" on " - "the %s command line. (%d - %d - %d < %d)", + ("Not enough RAM allocated. Try starting using \"-mem %d\" on " + "the %s command line. (%d - %d - %d < %d)", mem, PACKAGE_NAME, hunk_size, hunk_low_used, hunk_high_used, size); }