Import boehm-gc snapshot, taken from
[official-gcc.git] / boehm-gc / extra / gc.c
blob9c16d2066beabe65f98d22574b52857f7b0d56d0
1 /*
2 * Copyright (c) 1994 by Xerox Corporation. All rights reserved.
3 * Copyright (c) 1996 by Silicon Graphics. All rights reserved.
4 * Copyright (c) 1998 by Fergus Henderson. All rights reserved.
5 * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
6 * All rights reserved.
8 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
9 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
11 * Permission is hereby granted to use or copy this program
12 * for any purpose, provided the above notices are retained on all copies.
13 * Permission to modify the code and to distribute modified code is granted,
14 * provided the above notices are retained, and a notice that the code was
15 * modified is included with the above copyright notice.
18 /* This file could be used for the following purposes: */
19 /* - get the complete GC as a single link object file (module); */
20 /* - enable more compiler optimizations. */
22 /* Tip: to get the highest level of compiler optimizations, the typical */
23 /* compiler options (GCC) to use are: */
24 /* -O3 -fno-strict-aliasing -march=native -Wall -fprofile-generate/use */
26 /* Warning: GCC for Linux (for C++ clients only): Use -fexceptions both */
27 /* for GC and the client otherwise GC_thread_exit_proc() is not */
28 /* guaranteed to be invoked (see the comments in pthread_start.c). */
31 #define GC_INNER STATIC
32 #define GC_EXTERN GC_INNER
33 /* STATIC is defined in gcconfig.h. */
35 /* Small files go first... */
36 #include "../backgraph.c"
37 #include "../blacklst.c"
38 #include "../checksums.c"
39 #include "../gcj_mlc.c"
40 #include "../headers.c"
41 #include "../malloc.c"
42 #include "../new_hblk.c"
43 #include "../obj_map.c"
44 #include "../ptr_chck.c"
45 #include "../stubborn.c"
47 #include "../allchblk.c"
48 #include "../alloc.c"
49 #include "../dbg_mlc.c"
50 #include "../finalize.c"
51 #include "../fnlz_mlc.c"
52 #include "../mallocx.c"
53 #include "../mark.c"
54 #include "../mark_rts.c"
55 #include "../reclaim.c"
56 #include "../typd_mlc.c"
58 #include "../misc.c"
59 #include "../os_dep.c"
60 #include "../thread_local_alloc.c"
62 /* Most platform-specific files go here... */
63 #include "../darwin_stop_world.c"
64 #include "../dyn_load.c"
65 #include "../gc_dlopen.c"
66 #include "../mach_dep.c"
67 #include "../pcr_interface.c"
68 #include "../pthread_stop_world.c"
69 #include "../pthread_support.c"
70 #include "../specific.c"
71 #include "../win32_threads.c"
73 #include "../pthread_start.c"
75 /* Restore pthread calls redirection (if altered in */
76 /* pthread_stop_world.c, pthread_support.c or win32_threads.c). */
77 /* This is only useful if directly included from application */
78 /* (instead of linking gc). */
79 #ifndef GC_NO_THREAD_REDIRECTS
80 # include "gc_pthread_redirects.h"
81 #endif
83 /* real_malloc.c, extra/MacOS.c, extra/msvc_dbg.c are not included. */