Mercurial > projects > ldc
comparison druntime/import/core/memory.di @ 760:6f33b427bfd1
Seems like hg ignores .di files, so I missed a bunch of stuff. complete druntime should be there now :)
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 12 Nov 2008 00:19:18 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
759:d3eb054172f9 | 760:6f33b427bfd1 |
---|---|
1 // D import file generated from 'core\memory.d' | |
2 module core.memory; | |
3 private | |
4 { | |
5 extern (C) | |
6 { | |
7 void gc_init(); | |
8 } | |
9 extern (C) | |
10 { | |
11 void gc_term(); | |
12 } | |
13 extern (C) | |
14 { | |
15 void gc_enable(); | |
16 } | |
17 extern (C) | |
18 { | |
19 void gc_disable(); | |
20 } | |
21 extern (C) | |
22 { | |
23 void gc_collect(); | |
24 } | |
25 extern (C) | |
26 { | |
27 void gc_minimize(); | |
28 } | |
29 extern (C) | |
30 { | |
31 uint gc_getAttr(void* p); | |
32 } | |
33 extern (C) | |
34 { | |
35 uint gc_setAttr(void* p, uint a); | |
36 } | |
37 extern (C) | |
38 { | |
39 uint gc_clrAttr(void* p, uint a); | |
40 } | |
41 extern (C) | |
42 { | |
43 void* gc_malloc(size_t sz, uint ba = 0); | |
44 } | |
45 extern (C) | |
46 { | |
47 void* gc_calloc(size_t sz, uint ba = 0); | |
48 } | |
49 extern (C) | |
50 { | |
51 void* gc_realloc(void* p, size_t sz, uint ba = 0); | |
52 } | |
53 extern (C) | |
54 { | |
55 size_t gc_extend(void* p, size_t mx, size_t sz); | |
56 } | |
57 extern (C) | |
58 { | |
59 size_t gc_reserve(size_t sz); | |
60 } | |
61 extern (C) | |
62 { | |
63 void gc_free(void* p); | |
64 } | |
65 extern (C) | |
66 { | |
67 void* gc_addrOf(void* p); | |
68 } | |
69 extern (C) | |
70 { | |
71 size_t gc_sizeOf(void* p); | |
72 } | |
73 struct BlkInfo_ | |
74 { | |
75 void* base; | |
76 size_t size; | |
77 uint attr; | |
78 } | |
79 extern (C) | |
80 { | |
81 BlkInfo_ gc_query(void* p); | |
82 } | |
83 extern (C) | |
84 { | |
85 void gc_addRoot(void* p); | |
86 } | |
87 extern (C) | |
88 { | |
89 void gc_addRange(void* p, size_t sz); | |
90 } | |
91 extern (C) | |
92 { | |
93 void gc_removeRoot(void* p); | |
94 } | |
95 extern (C) | |
96 { | |
97 void gc_removeRange(void* p); | |
98 } | |
99 extern (C) | |
100 { | |
101 void* gc_getHandle(); | |
102 } | |
103 extern (C) | |
104 { | |
105 void gc_setHandle(void* p); | |
106 } | |
107 extern (C) | |
108 { | |
109 void gc_endHandle(); | |
110 } | |
111 } | |
112 struct GC | |
113 { | |
114 static | |
115 { | |
116 void enable() | |
117 { | |
118 gc_enable(); | |
119 } | |
120 } | |
121 static | |
122 { | |
123 void disable() | |
124 { | |
125 gc_disable(); | |
126 } | |
127 } | |
128 static | |
129 { | |
130 void collect() | |
131 { | |
132 gc_collect(); | |
133 } | |
134 } | |
135 static | |
136 { | |
137 void minimize() | |
138 { | |
139 gc_minimize(); | |
140 } | |
141 } | |
142 enum BlkAttr : uint | |
143 { | |
144 FINALIZE = 1, | |
145 NO_SCAN = 2, | |
146 NO_MOVE = 4, | |
147 } | |
148 alias BlkInfo_ BlkInfo; | |
149 static | |
150 { | |
151 uint getAttr(void* p) | |
152 { | |
153 return gc_getAttr(p); | |
154 } | |
155 } | |
156 static | |
157 { | |
158 uint setAttr(void* p, uint a) | |
159 { | |
160 return gc_setAttr(p,a); | |
161 } | |
162 } | |
163 static | |
164 { | |
165 uint clrAttr(void* p, uint a) | |
166 { | |
167 return gc_clrAttr(p,a); | |
168 } | |
169 } | |
170 static | |
171 { | |
172 void* malloc(size_t sz, uint ba = 0) | |
173 { | |
174 return gc_malloc(sz,ba); | |
175 } | |
176 } | |
177 static | |
178 { | |
179 void* calloc(size_t sz, uint ba = 0) | |
180 { | |
181 return gc_calloc(sz,ba); | |
182 } | |
183 } | |
184 static | |
185 { | |
186 void* realloc(void* p, size_t sz, uint ba = 0) | |
187 { | |
188 return gc_realloc(p,sz,ba); | |
189 } | |
190 } | |
191 static | |
192 { | |
193 size_t extend(void* p, size_t mx, size_t sz) | |
194 { | |
195 return gc_extend(p,mx,sz); | |
196 } | |
197 } | |
198 static | |
199 { | |
200 size_t reserve(size_t sz) | |
201 { | |
202 return gc_reserve(sz); | |
203 } | |
204 } | |
205 static | |
206 { | |
207 void free(void* p) | |
208 { | |
209 gc_free(p); | |
210 } | |
211 } | |
212 static | |
213 { | |
214 void* addrOf(void* p) | |
215 { | |
216 return gc_addrOf(p); | |
217 } | |
218 } | |
219 static | |
220 { | |
221 size_t sizeOf(void* p) | |
222 { | |
223 return gc_sizeOf(p); | |
224 } | |
225 } | |
226 static | |
227 { | |
228 BlkInfo query(void* p) | |
229 { | |
230 return gc_query(p); | |
231 } | |
232 } | |
233 static | |
234 { | |
235 void addRoot(void* p) | |
236 { | |
237 gc_addRoot(p); | |
238 } | |
239 } | |
240 static | |
241 { | |
242 void addRange(void* p, size_t sz) | |
243 { | |
244 gc_addRange(p,sz); | |
245 } | |
246 } | |
247 static | |
248 { | |
249 void removeRoot(void* p) | |
250 { | |
251 gc_removeRoot(p); | |
252 } | |
253 } | |
254 static | |
255 { | |
256 void removeRange(void* p) | |
257 { | |
258 gc_removeRange(p); | |
259 } | |
260 } | |
261 static | |
262 { | |
263 void* getHandle() | |
264 { | |
265 return gc_getHandle(); | |
266 } | |
267 } | |
268 static | |
269 { | |
270 void setHandle(void* p) | |
271 { | |
272 gc_setHandle(p); | |
273 } | |
274 } | |
275 static | |
276 { | |
277 void endHandle() | |
278 { | |
279 gc_endHandle(); | |
280 } | |
281 } | |
282 } |