@dmnks commented on this pull request.


> +     * Conservative estimates for thread use on 32bit systems where address
+     * space is an issue: 2GB for bare metal, 3GB for a 32bit process
+     * on a 64bit system.
+     */
+    if (thread) {
+       unsigned long vmem = mem;
+#if __WORDSIZE == 32
+       vmem = UINT32_MAX / 2;
+#else
+#if defined(__linux__)
+       if ((personality(0xffffffff) & PER_MASK) == PER_LINUX32)
+           vmem = (UINT32_MAX / 4) * 3;
+#endif
+#endif
+       /* Fixup to get nice even numbers */
+       vmem = vmem / (1024*1024) + 1;

While at it, maybe add the `proc` variant to the test case, too?

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

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

Reply via email to