fieker-DuValspielwiese
Last change
on this file since b973c0 was
a9974a,
checked in by Jens Schmidt <schmidt@…>, 27 years ago
|
dependency on SINGULAR removed
git-svn-id: file:///usr/local/Singular/svn/trunk@102 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | // emacs edit mode for this file is -*- C++ -*- |
---|
2 | // $Id: initgmp.cc,v 1.1 1997-03-27 10:01:44 schmidt Exp $ |
---|
3 | |
---|
4 | /* |
---|
5 | $Log: not supported by cvs2svn $ |
---|
6 | Revision 1.0 1996/05/17 10:59:46 stobbe |
---|
7 | Initial revision |
---|
8 | |
---|
9 | */ |
---|
10 | |
---|
11 | #include "cf_gmp.h" |
---|
12 | |
---|
13 | #include "assert.h" |
---|
14 | |
---|
15 | #include "cf_defs.h" |
---|
16 | |
---|
17 | #ifdef USE_MEMUTIL |
---|
18 | #ifdef USE_OLD_MEMMAN |
---|
19 | #include "memutil.h" |
---|
20 | #else |
---|
21 | #include "memman.h" |
---|
22 | #endif |
---|
23 | #endif |
---|
24 | |
---|
25 | #ifdef USE_MEMUTIL |
---|
26 | #ifndef USE_OLD_MEMMAN |
---|
27 | #ifdef MDEBUG |
---|
28 | void * mgAllocBlock( size_t t) |
---|
29 | { |
---|
30 | return mmDBAllocBlock(t,"gmp",0); |
---|
31 | } |
---|
32 | void mgFreeBlock( void* a, size_t t) |
---|
33 | { |
---|
34 | mmDBFreeBlock(a,t,"gmp",0); |
---|
35 | } |
---|
36 | void * mgReallocBlock( void* a, size_t t1, size_t t2) |
---|
37 | { |
---|
38 | return mmDBReallocBlock(a,t1,t2,"gmp",0); |
---|
39 | } |
---|
40 | #endif |
---|
41 | #endif |
---|
42 | #endif |
---|
43 | |
---|
44 | int initializeGMP() |
---|
45 | { |
---|
46 | static int initialized = 0; |
---|
47 | |
---|
48 | if ( ! initialized ) { |
---|
49 | initialized = 1; |
---|
50 | #ifdef USE_MEMUTIL |
---|
51 | #ifdef USE_OLD_MEMMAN |
---|
52 | mp_set_memory_functions( getBlock, reallocBlock, freeBlock ); |
---|
53 | #else |
---|
54 | #ifdef MDEBUG |
---|
55 | mp_set_memory_functions( mgAllocBlock, mgReallocBlock, mgFreeBlock ); |
---|
56 | #else |
---|
57 | mp_set_memory_functions( mmAllocBlock, mmReallocBlock, mmFreeBlock ); |
---|
58 | #endif |
---|
59 | #endif |
---|
60 | #endif |
---|
61 | } |
---|
62 | return 1; |
---|
63 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.