From: Russell Bryant Date: Fri, 6 May 2011 21:06:33 +0000 (+0000) Subject: Fix calculation of free RAM to make minmemfree option work. X-Git-Tag: 1.8.5-rc1~11^2~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df0cc7f9059208834b8cfce9689998219eb090ba;p=thirdparty%2Fasterisk.git Fix calculation of free RAM to make minmemfree option work. (closes issue #17124) Reported by: loic Patches: pbx_c.diff uploaded by loic (license 1020) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317917 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/pbx.c b/main/pbx.c index 1d4ea026fc..63cbd22b19 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -5002,7 +5002,7 @@ static int increase_call_count(const struct ast_channel *c) if (!sysinfo(&sys_info)) { /* make sure that the free system memory is above the configured low watermark * convert the amount of freeram from mem_units to MB */ - curfreemem = sys_info.freeram / sys_info.mem_unit; + curfreemem = sys_info.freeram * sys_info.mem_unit; curfreemem /= 1024 * 1024; if (curfreemem < option_minmemfree) { ast_log(LOG_WARNING, "Available system memory (~%ldMB) is below the configured low watermark (%ldMB)\n", curfreemem, option_minmemfree);