#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?
{{{
#!c
static void *
pari_mainstack_malloc(size_t size)
{
void *b = mmap(NULL, size, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE,-1,0);
return (b == MAP_FAILED) ? NULL: b;
}
}}}
The `MAP_NORESERVE` is indeed important, together with the fact that PARI
tries to use a small stack if possible. The enlarged stack is only used
when it's really needed.
--
Ticket URL: <http://trac.sagemath.org/ticket/19883#comment:16>
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.