https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317917 | russell | 2011-05-06 16:06:33 -0500 (Fri, 06 May 2011) | 7 lines
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/trunk@317919
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
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);