/src/cpython/Modules/gcmodule.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Python interface to the garbage collector. |
3 | | * |
4 | | * See Python/gc.c for the implementation of the garbage collector. |
5 | | */ |
6 | | |
7 | | #include "Python.h" |
8 | | #include "pycore_gc.h" |
9 | | #include "pycore_object.h" // _PyObject_IS_GC() |
10 | | #include "pycore_pystate.h" // _PyInterpreterState_GET() |
11 | | #include "pycore_tuple.h" // _PyTuple_FromArray() |
12 | | |
13 | | typedef struct _gc_runtime_state GCState; |
14 | | |
15 | | static GCState * |
16 | | get_gc_state(void) |
17 | 0 | { |
18 | 0 | PyInterpreterState *interp = _PyInterpreterState_GET(); |
19 | 0 | return &interp->gc; |
20 | 0 | } |
21 | | |
22 | | /*[clinic input] |
23 | | module gc |
24 | | [clinic start generated code]*/ |
25 | | /*[clinic end generated code: output=da39a3ee5e6b4b0d input=b5c9690ecc842d79]*/ |
26 | | #include "clinic/gcmodule.c.h" |
27 | | |
28 | | /*[clinic input] |
29 | | gc.enable |
30 | | |
31 | | Enable automatic garbage collection. |
32 | | [clinic start generated code]*/ |
33 | | |
34 | | static PyObject * |
35 | | gc_enable_impl(PyObject *module) |
36 | | /*[clinic end generated code: output=45a427e9dce9155c input=81ac4940ca579707]*/ |
37 | 0 | { |
38 | 0 | PyGC_Enable(); |
39 | 0 | Py_RETURN_NONE; |
40 | 0 | } |
41 | | |
42 | | /*[clinic input] |
43 | | gc.disable |
44 | | |
45 | | Disable automatic garbage collection. |
46 | | [clinic start generated code]*/ |
47 | | |
48 | | static PyObject * |
49 | | gc_disable_impl(PyObject *module) |
50 | | /*[clinic end generated code: output=97d1030f7aa9d279 input=8c2e5a14e800d83b]*/ |
51 | 0 | { |
52 | 0 | PyGC_Disable(); |
53 | 0 | Py_RETURN_NONE; |
54 | 0 | } |
55 | | |
56 | | /*[clinic input] |
57 | | gc.isenabled -> bool |
58 | | |
59 | | Returns true if automatic garbage collection is enabled. |
60 | | [clinic start generated code]*/ |
61 | | |
62 | | static int |
63 | | gc_isenabled_impl(PyObject *module) |
64 | | /*[clinic end generated code: output=1874298331c49130 input=30005e0422373b31]*/ |
65 | 0 | { |
66 | 0 | return PyGC_IsEnabled(); |
67 | 0 | } |
68 | | |
69 | | /*[clinic input] |
70 | | gc.collect -> Py_ssize_t |
71 | | |
72 | | generation: int(c_default="NUM_GENERATIONS - 1") = 2 |
73 | | |
74 | | Run the garbage collector. |
75 | | |
76 | | With no arguments, run a full collection. The optional argument |
77 | | may be an integer specifying which generation to collect. A ValueError |
78 | | is raised if the generation number is invalid. |
79 | | |
80 | | The number of unreachable objects is returned. |
81 | | [clinic start generated code]*/ |
82 | | |
83 | | static Py_ssize_t |
84 | | gc_collect_impl(PyObject *module, int generation) |
85 | | /*[clinic end generated code: output=b697e633043233c7 input=40720128b682d879]*/ |
86 | 0 | { |
87 | 0 | PyThreadState *tstate = _PyThreadState_GET(); |
88 | |
|
89 | 0 | if (generation < 0 || generation >= NUM_GENERATIONS) { |
90 | 0 | _PyErr_SetString(tstate, PyExc_ValueError, "invalid generation"); |
91 | 0 | return -1; |
92 | 0 | } |
93 | | |
94 | 0 | return _PyGC_Collect(tstate, generation, _Py_GC_REASON_MANUAL); |
95 | 0 | } |
96 | | |
97 | | /*[clinic input] |
98 | | gc.set_debug |
99 | | |
100 | | flags: int |
101 | | An integer that can have the following bits turned on: |
102 | | DEBUG_STATS - Print statistics during collection. |
103 | | DEBUG_COLLECTABLE - Print collectable objects found. |
104 | | DEBUG_UNCOLLECTABLE - Print unreachable but uncollectable objects |
105 | | found. |
106 | | DEBUG_SAVEALL - Save objects to gc.garbage rather than freeing them. |
107 | | DEBUG_LEAK - Debug leaking programs (everything but STATS). |
108 | | / |
109 | | |
110 | | Set the garbage collection debugging flags. |
111 | | |
112 | | Debugging information is written to sys.stderr. |
113 | | [clinic start generated code]*/ |
114 | | |
115 | | static PyObject * |
116 | | gc_set_debug_impl(PyObject *module, int flags) |
117 | | /*[clinic end generated code: output=7c8366575486b228 input=5e5ce15e84fbed15]*/ |
118 | 0 | { |
119 | 0 | GCState *gcstate = get_gc_state(); |
120 | 0 | gcstate->debug = flags; |
121 | 0 | Py_RETURN_NONE; |
122 | 0 | } |
123 | | |
124 | | /*[clinic input] |
125 | | gc.get_debug -> int |
126 | | |
127 | | Get the garbage collection debugging flags. |
128 | | [clinic start generated code]*/ |
129 | | |
130 | | static int |
131 | | gc_get_debug_impl(PyObject *module) |
132 | | /*[clinic end generated code: output=91242f3506cd1e50 input=91a101e1c3b98366]*/ |
133 | 0 | { |
134 | 0 | GCState *gcstate = get_gc_state(); |
135 | 0 | return gcstate->debug; |
136 | 0 | } |
137 | | |
138 | | /*[clinic input] |
139 | | gc.set_threshold |
140 | | |
141 | | threshold0: int |
142 | | [ |
143 | | threshold1: int |
144 | | [ |
145 | | threshold2: int |
146 | | ] |
147 | | ] |
148 | | / |
149 | | |
150 | | Set the collection thresholds (the collection frequency). |
151 | | |
152 | | Setting 'threshold0' to zero disables collection. |
153 | | [clinic start generated code]*/ |
154 | | |
155 | | static PyObject * |
156 | | gc_set_threshold_impl(PyObject *module, int threshold0, int group_right_1, |
157 | | int threshold1, int group_right_2, int threshold2) |
158 | | /*[clinic end generated code: output=2e3c7c7dd59060f3 input=0d9612db50984eec]*/ |
159 | 0 | { |
160 | 0 | GCState *gcstate = get_gc_state(); |
161 | |
|
162 | 0 | gcstate->young.threshold = threshold0; |
163 | 0 | if (group_right_1) { |
164 | 0 | gcstate->old[0].threshold = threshold1; |
165 | 0 | } |
166 | 0 | if (group_right_2) { |
167 | 0 | gcstate->old[1].threshold = threshold2; |
168 | 0 | } |
169 | 0 | Py_RETURN_NONE; |
170 | 0 | } |
171 | | |
172 | | /*[clinic input] |
173 | | gc.get_threshold |
174 | | |
175 | | Return the current collection thresholds. |
176 | | [clinic start generated code]*/ |
177 | | |
178 | | static PyObject * |
179 | | gc_get_threshold_impl(PyObject *module) |
180 | | /*[clinic end generated code: output=7902bc9f41ecbbd8 input=286d79918034d6e6]*/ |
181 | 0 | { |
182 | 0 | GCState *gcstate = get_gc_state(); |
183 | 0 | return Py_BuildValue("(iii)", |
184 | 0 | gcstate->young.threshold, |
185 | 0 | gcstate->old[0].threshold, |
186 | 0 | 0); |
187 | 0 | } |
188 | | |
189 | | /*[clinic input] |
190 | | gc.get_count |
191 | | |
192 | | Return a three-tuple of the current collection counts. |
193 | | [clinic start generated code]*/ |
194 | | |
195 | | static PyObject * |
196 | | gc_get_count_impl(PyObject *module) |
197 | | /*[clinic end generated code: output=354012e67b16398f input=a392794a08251751]*/ |
198 | 0 | { |
199 | 0 | GCState *gcstate = get_gc_state(); |
200 | |
|
201 | | #ifdef Py_GIL_DISABLED |
202 | | _PyThreadStateImpl *tstate = (_PyThreadStateImpl *)_PyThreadState_GET(); |
203 | | struct _gc_thread_state *gc = &tstate->gc; |
204 | | |
205 | | // Flush the local allocation count to the global count |
206 | | _Py_atomic_add_int(&gcstate->young.count, (int)gc->alloc_count); |
207 | | gc->alloc_count = 0; |
208 | | #endif |
209 | |
|
210 | 0 | return Py_BuildValue("(iii)", |
211 | 0 | gcstate->young.count, |
212 | 0 | gcstate->old[gcstate->visited_space].count, |
213 | 0 | gcstate->old[gcstate->visited_space^1].count); |
214 | 0 | } |
215 | | |
216 | | /*[clinic input] |
217 | | gc.get_referrers |
218 | | |
219 | | *objs: tuple |
220 | | |
221 | | Return the list of objects that directly refer to any of 'objs'. |
222 | | [clinic start generated code]*/ |
223 | | |
224 | | static PyObject * |
225 | | gc_get_referrers_impl(PyObject *module, PyObject *objs) |
226 | | /*[clinic end generated code: output=929d6dff26f609b9 input=9102be7ebee69ee3]*/ |
227 | 0 | { |
228 | 0 | if (PySys_Audit("gc.get_referrers", "(O)", objs) < 0) { |
229 | 0 | return NULL; |
230 | 0 | } |
231 | | |
232 | 0 | PyInterpreterState *interp = _PyInterpreterState_GET(); |
233 | 0 | return _PyGC_GetReferrers(interp, objs); |
234 | 0 | } |
235 | | |
236 | | /* Append obj to list; return true if error (out of memory), false if OK. */ |
237 | | static int |
238 | | referentsvisit(PyObject *obj, void *arg) |
239 | 0 | { |
240 | 0 | PyObject *list = arg; |
241 | 0 | return PyList_Append(list, obj) < 0; |
242 | 0 | } |
243 | | |
244 | | static int |
245 | | append_referrents(PyObject *result, PyObject *args) |
246 | 0 | { |
247 | 0 | for (Py_ssize_t i = 0; i < PyTuple_GET_SIZE(args); i++) { |
248 | 0 | PyObject *obj = PyTuple_GET_ITEM(args, i); |
249 | 0 | if (!_PyObject_IS_GC(obj)) { |
250 | 0 | continue; |
251 | 0 | } |
252 | | |
253 | 0 | traverseproc traverse = Py_TYPE(obj)->tp_traverse; |
254 | 0 | if (!traverse) { |
255 | 0 | continue; |
256 | 0 | } |
257 | 0 | if (traverse(obj, referentsvisit, result)) { |
258 | 0 | return -1; |
259 | 0 | } |
260 | 0 | } |
261 | 0 | return 0; |
262 | 0 | } |
263 | | |
264 | | /*[clinic input] |
265 | | gc.get_referents |
266 | | |
267 | | *objs: tuple |
268 | | |
269 | | Return the list of objects that are directly referred to by 'objs'. |
270 | | [clinic start generated code]*/ |
271 | | |
272 | | static PyObject * |
273 | | gc_get_referents_impl(PyObject *module, PyObject *objs) |
274 | | /*[clinic end generated code: output=6dfde40cd1588e1d input=55c078a6d0248fe0]*/ |
275 | 0 | { |
276 | 0 | if (PySys_Audit("gc.get_referents", "(O)", objs) < 0) { |
277 | 0 | return NULL; |
278 | 0 | } |
279 | 0 | PyInterpreterState *interp = _PyInterpreterState_GET(); |
280 | 0 | PyObject *result = PyList_New(0); |
281 | |
|
282 | 0 | if (result == NULL) { |
283 | 0 | return NULL; |
284 | 0 | } |
285 | | |
286 | | // NOTE: stop the world is a no-op in default build |
287 | 0 | _PyEval_StopTheWorld(interp); |
288 | 0 | int err = append_referrents(result, objs); |
289 | 0 | _PyEval_StartTheWorld(interp); |
290 | |
|
291 | 0 | if (err < 0) { |
292 | 0 | Py_CLEAR(result); |
293 | 0 | } |
294 | |
|
295 | 0 | return result; |
296 | 0 | } |
297 | | |
298 | | /*[clinic input] |
299 | | @permit_long_summary |
300 | | gc.get_objects |
301 | | generation: Py_ssize_t(accept={int, NoneType}, c_default="-1") = None |
302 | | Generation to extract the objects from. |
303 | | |
304 | | Return a list of objects tracked by the collector (excluding the list returned). |
305 | | |
306 | | If generation is not None, return only the objects tracked by the collector |
307 | | that are in that generation. |
308 | | [clinic start generated code]*/ |
309 | | |
310 | | static PyObject * |
311 | | gc_get_objects_impl(PyObject *module, Py_ssize_t generation) |
312 | | /*[clinic end generated code: output=48b35fea4ba6cb0e input=a887f1d9924be7cf]*/ |
313 | 0 | { |
314 | 0 | if (PySys_Audit("gc.get_objects", "n", generation) < 0) { |
315 | 0 | return NULL; |
316 | 0 | } |
317 | | |
318 | 0 | if (generation >= NUM_GENERATIONS) { |
319 | 0 | return PyErr_Format(PyExc_ValueError, |
320 | 0 | "generation parameter must be less than the number of " |
321 | 0 | "available generations (%i)", |
322 | 0 | NUM_GENERATIONS); |
323 | 0 | } |
324 | | |
325 | 0 | if (generation < -1) { |
326 | 0 | PyErr_SetString(PyExc_ValueError, |
327 | 0 | "generation parameter cannot be negative"); |
328 | 0 | return NULL; |
329 | 0 | } |
330 | | |
331 | 0 | PyInterpreterState *interp = _PyInterpreterState_GET(); |
332 | 0 | return _PyGC_GetObjects(interp, (int)generation); |
333 | 0 | } |
334 | | |
335 | | /*[clinic input] |
336 | | gc.get_stats |
337 | | |
338 | | Return a list of dictionaries containing per-generation statistics. |
339 | | [clinic start generated code]*/ |
340 | | |
341 | | static PyObject * |
342 | | gc_get_stats_impl(PyObject *module) |
343 | | /*[clinic end generated code: output=a8ab1d8a5d26f3ab input=1ef4ed9d17b1a470]*/ |
344 | 0 | { |
345 | 0 | int i; |
346 | 0 | struct gc_generation_stats stats[NUM_GENERATIONS], *st; |
347 | | |
348 | | /* To get consistent values despite allocations while constructing |
349 | | the result list, we use a snapshot of the running stats. */ |
350 | 0 | GCState *gcstate = get_gc_state(); |
351 | 0 | for (i = 0; i < NUM_GENERATIONS; i++) { |
352 | 0 | stats[i] = gcstate->generation_stats[i]; |
353 | 0 | } |
354 | |
|
355 | 0 | PyObject *result = PyList_New(0); |
356 | 0 | if (result == NULL) |
357 | 0 | return NULL; |
358 | | |
359 | 0 | for (i = 0; i < NUM_GENERATIONS; i++) { |
360 | 0 | PyObject *dict; |
361 | 0 | st = &stats[i]; |
362 | 0 | dict = Py_BuildValue("{snsnsn}", |
363 | 0 | "collections", st->collections, |
364 | 0 | "collected", st->collected, |
365 | 0 | "uncollectable", st->uncollectable |
366 | 0 | ); |
367 | 0 | if (dict == NULL) |
368 | 0 | goto error; |
369 | 0 | if (PyList_Append(result, dict)) { |
370 | 0 | Py_DECREF(dict); |
371 | 0 | goto error; |
372 | 0 | } |
373 | 0 | Py_DECREF(dict); |
374 | 0 | } |
375 | 0 | return result; |
376 | | |
377 | 0 | error: |
378 | 0 | Py_XDECREF(result); |
379 | 0 | return NULL; |
380 | 0 | } |
381 | | |
382 | | |
383 | | /*[clinic input] |
384 | | gc.is_tracked -> bool |
385 | | |
386 | | obj: object |
387 | | / |
388 | | |
389 | | Returns true if the object is tracked by the garbage collector. |
390 | | |
391 | | Simple atomic objects will return false. |
392 | | [clinic start generated code]*/ |
393 | | |
394 | | static int |
395 | | gc_is_tracked_impl(PyObject *module, PyObject *obj) |
396 | | /*[clinic end generated code: output=91c8d086b7f47a33 input=423b98ec680c3126]*/ |
397 | 0 | { |
398 | 0 | return PyObject_GC_IsTracked(obj); |
399 | 0 | } |
400 | | |
401 | | /*[clinic input] |
402 | | gc.is_finalized -> bool |
403 | | |
404 | | obj: object |
405 | | / |
406 | | |
407 | | Returns true if the object has been already finalized by the GC. |
408 | | [clinic start generated code]*/ |
409 | | |
410 | | static int |
411 | | gc_is_finalized_impl(PyObject *module, PyObject *obj) |
412 | | /*[clinic end generated code: output=401ff5d6fc660429 input=ca4d111c8f8c4e3a]*/ |
413 | 0 | { |
414 | 0 | return PyObject_GC_IsFinalized(obj); |
415 | 0 | } |
416 | | |
417 | | /*[clinic input] |
418 | | @permit_long_docstring_body |
419 | | gc.freeze |
420 | | |
421 | | Freeze all current tracked objects and ignore them for future collections. |
422 | | |
423 | | This can be used before a POSIX fork() call to make the gc copy-on-write friendly. |
424 | | Note: collection before a POSIX fork() call may free pages for future allocation |
425 | | which can cause copy-on-write. |
426 | | [clinic start generated code]*/ |
427 | | |
428 | | static PyObject * |
429 | | gc_freeze_impl(PyObject *module) |
430 | | /*[clinic end generated code: output=502159d9cdc4c139 input=11fb59b0a75dcf3d]*/ |
431 | 0 | { |
432 | 0 | PyInterpreterState *interp = _PyInterpreterState_GET(); |
433 | 0 | _PyGC_Freeze(interp); |
434 | 0 | Py_RETURN_NONE; |
435 | 0 | } |
436 | | |
437 | | /*[clinic input] |
438 | | gc.unfreeze |
439 | | |
440 | | Unfreeze all objects in the permanent generation. |
441 | | |
442 | | Put all objects in the permanent generation back into oldest generation. |
443 | | [clinic start generated code]*/ |
444 | | |
445 | | static PyObject * |
446 | | gc_unfreeze_impl(PyObject *module) |
447 | | /*[clinic end generated code: output=1c15f2043b25e169 input=2dd52b170f4cef6c]*/ |
448 | 0 | { |
449 | 0 | PyInterpreterState *interp = _PyInterpreterState_GET(); |
450 | 0 | _PyGC_Unfreeze(interp); |
451 | 0 | Py_RETURN_NONE; |
452 | 0 | } |
453 | | |
454 | | /*[clinic input] |
455 | | gc.get_freeze_count -> Py_ssize_t |
456 | | |
457 | | Return the number of objects in the permanent generation. |
458 | | [clinic start generated code]*/ |
459 | | |
460 | | static Py_ssize_t |
461 | | gc_get_freeze_count_impl(PyObject *module) |
462 | | /*[clinic end generated code: output=61cbd9f43aa032e1 input=45ffbc65cfe2a6ed]*/ |
463 | 0 | { |
464 | 0 | PyInterpreterState *interp = _PyInterpreterState_GET(); |
465 | 0 | return _PyGC_GetFreezeCount(interp); |
466 | 0 | } |
467 | | |
468 | | |
469 | | PyDoc_STRVAR(gc__doc__, |
470 | | "This module provides access to the garbage collector for reference cycles.\n" |
471 | | "\n" |
472 | | "enable() -- Enable automatic garbage collection.\n" |
473 | | "disable() -- Disable automatic garbage collection.\n" |
474 | | "isenabled() -- Returns true if automatic collection is enabled.\n" |
475 | | "collect() -- Do a full collection right now.\n" |
476 | | "get_count() -- Return the current collection counts.\n" |
477 | | "get_stats() -- Return list of dictionaries containing per-generation stats.\n" |
478 | | "set_debug() -- Set debugging flags.\n" |
479 | | "get_debug() -- Get debugging flags.\n" |
480 | | "set_threshold() -- Set the collection thresholds.\n" |
481 | | "get_threshold() -- Return the current the collection thresholds.\n" |
482 | | "get_objects() -- Return a list of all objects tracked by the collector.\n" |
483 | | "is_tracked() -- Returns true if a given object is tracked.\n" |
484 | | "is_finalized() -- Returns true if a given object has been already finalized.\n" |
485 | | "get_referrers() -- Return the list of objects that refer to an object.\n" |
486 | | "get_referents() -- Return the list of objects that an object refers to.\n" |
487 | | "freeze() -- Freeze all tracked objects and ignore them for future collections.\n" |
488 | | "unfreeze() -- Unfreeze all objects in the permanent generation.\n" |
489 | | "get_freeze_count() -- Return the number of objects in the permanent generation.\n"); |
490 | | |
491 | | static PyMethodDef GcMethods[] = { |
492 | | GC_ENABLE_METHODDEF |
493 | | GC_DISABLE_METHODDEF |
494 | | GC_ISENABLED_METHODDEF |
495 | | GC_SET_DEBUG_METHODDEF |
496 | | GC_GET_DEBUG_METHODDEF |
497 | | GC_GET_COUNT_METHODDEF |
498 | | GC_SET_THRESHOLD_METHODDEF |
499 | | GC_GET_THRESHOLD_METHODDEF |
500 | | GC_COLLECT_METHODDEF |
501 | | GC_GET_OBJECTS_METHODDEF |
502 | | GC_GET_STATS_METHODDEF |
503 | | GC_IS_TRACKED_METHODDEF |
504 | | GC_IS_FINALIZED_METHODDEF |
505 | | GC_GET_REFERRERS_METHODDEF |
506 | | GC_GET_REFERENTS_METHODDEF |
507 | | GC_FREEZE_METHODDEF |
508 | | GC_UNFREEZE_METHODDEF |
509 | | GC_GET_FREEZE_COUNT_METHODDEF |
510 | | {NULL, NULL} /* Sentinel */ |
511 | | }; |
512 | | |
513 | | static int |
514 | | gcmodule_exec(PyObject *module) |
515 | 0 | { |
516 | 0 | GCState *gcstate = get_gc_state(); |
517 | | |
518 | | /* garbage and callbacks are initialized by _PyGC_Init() early in |
519 | | * interpreter lifecycle. */ |
520 | 0 | assert(gcstate->garbage != NULL); |
521 | 0 | if (PyModule_AddObjectRef(module, "garbage", gcstate->garbage) < 0) { |
522 | 0 | return -1; |
523 | 0 | } |
524 | 0 | assert(gcstate->callbacks != NULL); |
525 | 0 | if (PyModule_AddObjectRef(module, "callbacks", gcstate->callbacks) < 0) { |
526 | 0 | return -1; |
527 | 0 | } |
528 | | |
529 | 0 | #define ADD_INT(NAME) if (PyModule_AddIntConstant(module, #NAME, _PyGC_ ## NAME) < 0) { return -1; } |
530 | 0 | ADD_INT(DEBUG_STATS); |
531 | 0 | ADD_INT(DEBUG_COLLECTABLE); |
532 | 0 | ADD_INT(DEBUG_UNCOLLECTABLE); |
533 | 0 | ADD_INT(DEBUG_SAVEALL); |
534 | 0 | ADD_INT(DEBUG_LEAK); |
535 | 0 | #undef ADD_INT |
536 | 0 | return 0; |
537 | 0 | } |
538 | | |
539 | | static PyModuleDef_Slot gcmodule_slots[] = { |
540 | | {Py_mod_exec, gcmodule_exec}, |
541 | | {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED}, |
542 | | {Py_mod_gil, Py_MOD_GIL_NOT_USED}, |
543 | | {0, NULL} |
544 | | }; |
545 | | |
546 | | static struct PyModuleDef gcmodule = { |
547 | | PyModuleDef_HEAD_INIT, |
548 | | .m_name = "gc", |
549 | | .m_doc = gc__doc__, |
550 | | .m_size = 0, // per interpreter state, see: get_gc_state() |
551 | | .m_methods = GcMethods, |
552 | | .m_slots = gcmodule_slots |
553 | | }; |
554 | | |
555 | | PyMODINIT_FUNC |
556 | | PyInit_gc(void) |
557 | 0 | { |
558 | 0 | return PyModuleDef_Init(&gcmodule); |
559 | 0 | } |