#19883: Let PARI handle its own stack
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-7.0
Component: packages: | Resolution:
standard | Merged in:
Keywords: | Reviewers:
Authors: Jeroen Demeyer | Work issues:
Report Upstream: Reported | Commit:
upstream. No feedback yet. | 435a4fe79fb3b2d7a652c4d512bc6531c4762ab3
Branch: | Stopgaps:
u/jdemeyer/let_pari_handle_its_own_stack|
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
Replying to [comment:15 vbraun]:
> How is Pari implementing this? In GAP its mmap **without**
MAP_NORESERVE, so even if its just virtual memory it reserves swap. And if
you do it often (parallel doctesting comes to mind) your swap is used up
and virtual allocations suddenly are forced into ram.
I don't quite get what you mean with "reserves swap". It reserves virtual
memory, but I don't think that it allocates actual pages on the swap file.
That wouldn't make sense for pages which are completely unused (never been
written to nor read from). But even then, you want active processes to use
RAM, not swap so I don't really see the problem.
Second, what you write is only true if your OS does not overcommit memory.
At least Linux overcommits by default, such that the total amount of
virtual memory you can allocate is greater than RAM + swap.
So, after thinking about this a bit more, I don't think that
`MAP_NORESERVE` is actually so important. It helps by keeping more virtual
memory available, but it doesn't change at all how phyisical memory (i.e.
RAM) is used.
--
Ticket URL: <http://trac.sagemath.org/ticket/19883#comment:20>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.