On Mon, Jan 30, 2006 at 11:50:27AM +0100, Leonardo Macchia wrote:
> It seems that min-memory check has some trouble in systems with more
> than 4 GB memory (RAM+swaps). In my log I see:

Could you please try whether the attached patch works for you?

I'd prefer to not use long long if I don't have to.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: [EMAIL PROTECTED]
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
--- src/memory.c.orig   2006-04-17 14:23:19.000000000 +0200
+++ src/memory.c        2006-04-17 14:23:43.000000000 +0200
@@ -79,7 +79,7 @@
        syslog(LOG_INFO, "currently there are %d kB of free memory available", 
free);
 #endif                         /* USE_SYSLOG */
 
-    if (free * 1024 < minpages * EXEC_PAGESIZE) {
+    if (free < minpages * (EXEC_PAGESIZE/1024)) {
 #if USE_SYSLOG
        syslog(LOG_ERR, "memory %d kB is less than %d pages", free, minpages);
 #endif                         /* USE_SYSLOG */

Reply via email to