GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
#ifdef __cplusplus1extern "C" {2#endif345/* check that this routine is included only once */6#ifndef _MALLOC_78#define _MALLOC_910#define m_alloc m_alloc_d111#define c_alloc c_alloc_d112#define re_alloc re_alloc_d113#define fr_ee fr_ee_d11415/* decide which diagnostics we want */1617#ifdef DIAG118/* take this definition to have moderate control */19#define malloc m_alloc_d120#define calloc c_alloc_d121#define realloc re_alloc_d122#define free fr_ee_d123#endif2425#ifdef DIAG226/* and this to control all the memory constantly (slow) */27#define malloc m_alloc_d228#define calloc c_alloc_d229#define realloc re_alloc_d230#define free fr_ee_d231#endif3233/*====================================================================*\34|| Prototypes der verschiedenen m_alloc-Funktionen, die bei der Suche ||35|| nach Fehlern in der Speicherverwaltung helfen koennen. ||36|| Sie sind hier untergebracht, da sie vor dem einbinden von ||37|| 'arith_const' bekannt sein muessen. ||38\*====================================================================*/39#ifdef __STDC__40void *m_alloc_d1(int );41void *c_alloc_d1(int , int );42void *re_alloc_d1(void *, int );43void fr_ee_d1(void *);4445void *m_alloc_d2(int );46void *c_alloc_d2(int , int );47void *re_alloc_d2(void *, int );48void fr_ee_d2(void *);4950void pointer_statistics(unsigned *,int);51#else52void *m_alloc_d1();53void *c_alloc_d1();54void *re_alloc_d1();55void fr_ee_d1();5657void *m_alloc_d2();58void *c_alloc_d2();59void *re_alloc_d2();60void fr_ee_d2();6162void pointer_statistics();63#endif6465/*====================================================================*\66|| Pointer auf die verschiedenen m_alloc-Funktionen, die bei der Suche||67|| nach Fehlern in der Speicherverwaltung helfen koennen. ||68\*====================================================================*/69/*70#ifdef __STDC__71extern int *(*m_alloc ) (int );72extern int *(*c_alloc ) (int , int);73extern int *(*re_alloc) (void *, int);74extern void (*fr_ee ) (void * );75#else76extern int *(*m_alloc ) (int );77extern int *(*c_alloc ) (int , int);78extern int *(*re_alloc) (void *, int);79extern void (*fr_ee ) (void * );80#endif81*/8283#endif /* #ifndef _MALLOC_ */848586#ifdef __cplusplus87}88#endif89909192