Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563580 views
1
#ifdef __cplusplus
2
extern "C" {
3
#endif
4
5
6
/* check that this routine is included only once */
7
#ifndef _MALLOC_
8
9
#define _MALLOC_
10
11
#define m_alloc m_alloc_d1
12
#define c_alloc c_alloc_d1
13
#define re_alloc re_alloc_d1
14
#define fr_ee fr_ee_d1
15
16
/* decide which diagnostics we want */
17
18
#ifdef DIAG1
19
/* take this definition to have moderate control */
20
#define malloc m_alloc_d1
21
#define calloc c_alloc_d1
22
#define realloc re_alloc_d1
23
#define free fr_ee_d1
24
#endif
25
26
#ifdef DIAG2
27
/* and this to control all the memory constantly (slow) */
28
#define malloc m_alloc_d2
29
#define calloc c_alloc_d2
30
#define realloc re_alloc_d2
31
#define free fr_ee_d2
32
#endif
33
34
/*====================================================================*\
35
|| Prototypes der verschiedenen m_alloc-Funktionen, die bei der Suche ||
36
|| nach Fehlern in der Speicherverwaltung helfen koennen. ||
37
|| Sie sind hier untergebracht, da sie vor dem einbinden von ||
38
|| 'arith_const' bekannt sein muessen. ||
39
\*====================================================================*/
40
#ifdef __STDC__
41
void *m_alloc_d1(int );
42
void *c_alloc_d1(int , int );
43
void *re_alloc_d1(void *, int );
44
void fr_ee_d1(void *);
45
46
void *m_alloc_d2(int );
47
void *c_alloc_d2(int , int );
48
void *re_alloc_d2(void *, int );
49
void fr_ee_d2(void *);
50
51
void pointer_statistics(unsigned *,int);
52
#else
53
void *m_alloc_d1();
54
void *c_alloc_d1();
55
void *re_alloc_d1();
56
void fr_ee_d1();
57
58
void *m_alloc_d2();
59
void *c_alloc_d2();
60
void *re_alloc_d2();
61
void fr_ee_d2();
62
63
void pointer_statistics();
64
#endif
65
66
/*====================================================================*\
67
|| Pointer auf die verschiedenen m_alloc-Funktionen, die bei der Suche||
68
|| nach Fehlern in der Speicherverwaltung helfen koennen. ||
69
\*====================================================================*/
70
/*
71
#ifdef __STDC__
72
extern int *(*m_alloc ) (int );
73
extern int *(*c_alloc ) (int , int);
74
extern int *(*re_alloc) (void *, int);
75
extern void (*fr_ee ) (void * );
76
#else
77
extern int *(*m_alloc ) (int );
78
extern int *(*c_alloc ) (int , int);
79
extern int *(*re_alloc) (void *, int);
80
extern void (*fr_ee ) (void * );
81
#endif
82
*/
83
84
#endif /* #ifndef _MALLOC_ */
85
86
87
#ifdef __cplusplus
88
}
89
#endif
90
91
92