Building the gmp
From ApCoCoAWiki
Revision as of 18:52, 15 November 2005 by KHiddemann (talk | contribs)
Build Options for the GMP
There are many different possible configurations when building the gmp. One that is very important to CoCoA is how to allocate memory in the gmp since large numbers can overflow the stack quite easily. For a general overview for the gmp 4.1 have a look at http://www.gnu.org/software/gmp/manual/html_node/Build-Options.html.
So when configuring the gmp make sure that you choose
--enable-alloca=no
in order to use malloc and thereby using the heap instead of the stack. This entails a small (roughly 2% or so) performance penalty but at least your computation finishes instead of segfaulting for mysterious reasons.
This article is a stub. You can make this wiki more useful by adding information.