@pmatilai commented on this pull request.


> +    long int pagesize = sysconf(_SC_PAGESIZE);
+    long int pages = sysconf(_SC_PHYS_PAGES);
+
+    if (pagesize < 0)
+       pagesize = 4096;
+    if (pages > 0)
+       mem = pages * pagesize;
+
+    return mem;
+}
+
+static unsigned long getmem_proc(int thread)
+{
+    unsigned long mem = getmem_total();
+    /*
+     * Conservative estimates for thread use on 32bit systems where address

The total 32bit address space is 4GB. On a native 32bit Linux system, the 
kernel eats 1GB out of that, leaving 3GB for the process. On a 64bit system a 
32bit process has nearly all of the 4GB available to it. While running out of 
physical memory can be handled by virtual memory (aka swap), the address space 
is a hard limit and rpm can't handle running into it. Which is why the 
estimates are very conservative.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2418#discussion_r1147296184
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2418/review/1356269...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to