spielwiese
Last change
on this file since d6681d was
d6681d,
checked in by Olaf Bachmann <obachman@…>, 25 years ago
|
* automatic_gc
git-svn-id: file:///usr/local/Singular/svn/trunk@3795 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
2.1 KB
|
Line | |
---|
1 | /******************************************************************* |
---|
2 | * Computer Algebra System SINGULAR |
---|
3 | * |
---|
4 | * aso.h: Header file for generation of ALLOC_SIZE_OF_ macros |
---|
5 | * |
---|
6 | * Version: $Id: aso.h,v 1.2 1999-10-26 15:06:09 obachman Exp $ |
---|
7 | *******************************************************************/ |
---|
8 | #ifndef ASO_H |
---|
9 | #define ASO_H |
---|
10 | |
---|
11 | /* define HAVE_ASO to 0, which means ASO generation */ |
---|
12 | #undef HAVE_ASO |
---|
13 | #define HAVE_ASO 0 |
---|
14 | #define ASO_GENERATE |
---|
15 | |
---|
16 | #include <stdio.h> |
---|
17 | #include "mod2.h" |
---|
18 | #include "mmtables.inc" |
---|
19 | |
---|
20 | #define ASO(x) \ |
---|
21 | do \ |
---|
22 | { \ |
---|
23 | int index = mmGetIndex(sizeof(x)); \ |
---|
24 | if (index < 0) \ |
---|
25 | { \ |
---|
26 | fprintf(stderr, "sizeof(%s) == %d larger than MAX_BLOCK_SIZE\n", \ |
---|
27 | #x, sizeof(x)); \ |
---|
28 | exit(1); \ |
---|
29 | } \ |
---|
30 | printf("#define ALLOC_SIZE_OF_%s AllocHeapSizeOf(&mm_theList[%d], sizeof(%s), %s*)\n", #x, index, #x, #x); \ |
---|
31 | printf("#define ALLOC0_SIZE_OF_%s Alloc0HeapSizeOf(&mm_theList[%d], sizeof(%s), %s*)\n", #x, index, #x, #x); \ |
---|
32 | printf("#define FREE_SIZE_OF_%s(addr) FreeHeapSizeOf(addr, &mm_theList[%d], sizeof(%s))\n\n", #x, index, #x); \ |
---|
33 | } \ |
---|
34 | while (0) |
---|
35 | |
---|
36 | #endif /* ASO_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.