forked from stepcode/stepcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmemory.c
More file actions
98 lines (69 loc) · 3.34 KB
/
memory.c
File metadata and controls
98 lines (69 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#include "express/memory.h"
#include "express/alloc.h"
#include "express/alg.h"
#include "express/hash.h"
#include "express/symbol.h"
#include "express/schema.h"
#include "express/type.h"
struct freelist_head HASH_Table_fl;
struct freelist_head HASH_Element_fl;
struct freelist_head LINK_fl;
struct freelist_head LIST_fl;
struct freelist_head ERROR_OPT_fl;
struct freelist_head SYMBOL_fl;
struct freelist_head SCOPE_fl;
struct freelist_head SCHEMA_fl;
struct freelist_head REN_fl;
struct freelist_head TYPEHEAD_fl;
struct freelist_head TYPEBODY_fl;
struct freelist_head VAR_fl;
struct freelist_head ENTITY_fl;
struct freelist_head CASE_IT_fl;
struct freelist_head EXP_fl;
struct freelist_head OP_fl;
struct freelist_head QUERY_fl;
struct freelist_head QUAL_ATTR_fl;
struct freelist_head STMT_fl;
struct freelist_head ALIAS_fl;
struct freelist_head ASSIGN_fl;
struct freelist_head CASE_fl;
struct freelist_head COMP_STMT_fl;
struct freelist_head COND_fl;
struct freelist_head LOOP_fl;
struct freelist_head PCALL_fl;
struct freelist_head RET_fl;
struct freelist_head INCR_fl;
void MEMORYinitialize() {
_ALLOCinitialize();
ALLOCinitialize( &HASH_Table_fl, sizeof( struct Hash_Table_ ), 50, 50 );
ALLOCinitialize( &HASH_Element_fl, sizeof( struct Element_ ), 500, 100 );
ALLOCinitialize( &LINK_fl, sizeof( struct Link_ ), 500, 100 );
ALLOCinitialize( &LIST_fl, sizeof( struct Linked_List_ ), 100, 50 );
ALLOCinitialize( &SYMBOL_fl, sizeof( struct Symbol_ ), 100, 100 );
ALLOCinitialize( &SCOPE_fl, sizeof( struct Scope_ ), 100, 50 );
ALLOCinitialize( &TYPEHEAD_fl, sizeof( struct TypeHead_ ), 500, 100 );
ALLOCinitialize( &TYPEBODY_fl, sizeof( struct TypeBody_ ), 200, 100 );
ALLOCinitialize( &VAR_fl, sizeof( struct Variable_ ), 100, 50 );
ALLOCinitialize( &FUNC_fl, sizeof( struct Function_ ), 100, 50 );
ALLOCinitialize( &RULE_fl, sizeof( struct Rule_ ), 100, 50 );
ALLOCinitialize( &PROC_fl, sizeof( struct Procedure_ ), 100, 50 );
ALLOCinitialize( &WHERE_fl, sizeof( struct Where_ ), 100, 50 );
ALLOCinitialize( &ENTITY_fl, sizeof( struct Entity_ ), 500, 100 );
ALLOCinitialize( &SCHEMA_fl, sizeof( struct Schema_ ), 40, 20 );
ALLOCinitialize( &REN_fl, sizeof( struct Rename ), 30, 30 );
ALLOCinitialize( &CASE_IT_fl, sizeof( struct Case_Item_ ), 500, 100 );
ALLOCinitialize( &EXP_fl, sizeof( struct Expression_ ), 500, 200 );
ALLOCinitialize( &OP_fl, sizeof( struct Op_Subexpression ), 500, 100 );
ALLOCinitialize( &QUERY_fl, sizeof( struct Query_ ), 50, 10 );
ALLOCinitialize( &QUAL_ATTR_fl, sizeof( struct Query_ ), 20, 10 );
ALLOCinitialize( &STMT_fl, sizeof( struct Statement_ ), 500, 100 );
ALLOCinitialize( &ALIAS_fl, sizeof( struct Alias_ ), 10, 10 );
ALLOCinitialize( &ASSIGN_fl, sizeof( struct Assignment_ ), 100, 30 );
ALLOCinitialize( &CASE_fl, sizeof( struct Case_Statement_ ), 100, 30 );
ALLOCinitialize( &COMP_STMT_fl, sizeof( struct Compound_Statement_ ), 100, 30 );
ALLOCinitialize( &COND_fl, sizeof( struct Conditional_ ), 100, 30 );
ALLOCinitialize( &LOOP_fl, sizeof( struct Loop_ ), 100, 30 );
ALLOCinitialize( &PCALL_fl, sizeof( struct Procedure_Call_ ), 100, 30 );
ALLOCinitialize( &RET_fl, sizeof( struct Return_Statement_ ), 100, 30 );
ALLOCinitialize( &INCR_fl, sizeof( struct Increment_ ), 100, 30 );
}