Difference between revisions of "Building the gmp"

From ApCoCoAWiki
m (adding stub template)
(gmp and stack usage)
Line 1: Line 1:
 +
=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 quitre easily. For a general overview for the gmp 4.1 have a look [http://www.gnu.org/software/gmp/manual/html_node/Build-Options.html here].
 +
 +
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 (rougly 2% or so) performance penalty but at least your computation finished instead of segfaulting for mysterious reasons.
 +
 
{{stub}}
 
{{stub}}

Revision as of 10:14, 15 November 2005

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 quitre easily. For a general overview for the gmp 4.1 have a look here.

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 (rougly 2% or so) performance penalty but at least your computation finished instead of segfaulting for mysterious reasons.

This article is a stub. You can make this wiki more useful by adding information.