[Rpm-maint] [rpm-software-management/rpm] Consider available memory and address space for parallel execution (PR #2418)
Michal Domonkos
notifications at github.com
Wed Mar 22 16:27:52 UTC 2023
@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/1353030361 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230322/c641fa65/attachment.html>
More information about the Rpm-maint
mailing list