[Rpm-maint] [rpm-software-management/rpm] Consider available memory and address space for parallel execution (PR #2418)

Panu Matilainen notifications at github.com
Fri Mar 24 09:01:10 UTC 2023


@pmatilai 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;

Fixed + test added in last push.

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

Message ID: <rpm-software-management/rpm/pull/2418/review/1356253475 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230324/b397d884/attachment-0001.html>


More information about the Rpm-maint mailing list