Merge: doc: fixed some typos and other misc. corrections
[nit.git] / clib / gc_chooser.h
1 #ifndef NIT_GC_CHOOSER_H
2 #define NIT_GC_CHOOSER_H
3
4 /* This file is part of NIT ( http://www.nitlanguage.org ).
5 *
6 * This file is free software, which comes along with NIT. This software is
7 * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
9 * PARTICULAR PURPOSE. You can modify it is you want, provided this header
10 * is kept unaltered, and a notification of the changes is added.
11 * You are allowed to redistribute it and sell it, alone or is a part of
12 * another product.
13 */
14
15 #include <stdio.h>
16
17 /* GC and memory management */
18 void *nit_alloc(size_t); /* allocate memory to store an object with an object header */
19 void *nit_raw_alloc(size_t); /* allocate raw memory to store a raw stram of byte */
20 void nit_gcollect(void); /* force a garbage collection */
21 void initialize_gc_option(void); /* Select the wanted GC using envvar `NIT_GC_OPTION` */
22
23 void gc_register_finalizer(void*); /* Tag a pointer for finalization */
24 void gc_finalize(void*, void*); /* Finalize a pointer, implemented in the generated code. */
25 void object_destroy_callback(void*, void*); /* call into an object finalizer to record some traces. */
26
27 #endif