gc.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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.
  7. *
  8. * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
  9. * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
  10. *
  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.
  16. */
  17. /* This file could be used for the following purposes: */
  18. /* - get the complete GC as a single link object file (module); */
  19. /* - enable more compiler optimizations. */
  20. /* Tip: to get the highest level of compiler optimizations, the typical */
  21. /* compiler options (GCC) to use are: */
  22. /* -O3 -fno-strict-aliasing -march=native -Wall -fprofile-generate/use */
  23. /* Warning: GCC for Linux (for C++ clients only): Use -fexceptions both */
  24. /* for GC and the client otherwise GC_thread_exit_proc() is not */
  25. /* guaranteed to be invoked (see the comments in pthread_start.c). */
  26. #ifndef __cplusplus
  27. /* static is desirable here for more efficient linkage. */
  28. /* TODO: Enable this in case of the compilation as C++ code. */
  29. # define GC_INNER STATIC
  30. # define GC_EXTERN GC_INNER
  31. /* STATIC is defined in gcconfig.h. */
  32. #endif
  33. /* Small files go first... */
  34. #include "../backgraph.c"
  35. #include "../blacklst.c"
  36. #include "../checksums.c"
  37. #include "../gcj_mlc.c"
  38. #include "../headers.c"
  39. #include "../new_hblk.c"
  40. #include "../obj_map.c"
  41. #include "../ptr_chck.c"
  42. #include "gc_inline.h"
  43. #include "../allchblk.c"
  44. #include "../alloc.c"
  45. #include "../dbg_mlc.c"
  46. #include "../finalize.c"
  47. #include "../fnlz_mlc.c"
  48. #include "../malloc.c"
  49. #include "../mallocx.c"
  50. #include "../mark.c"
  51. #include "../mark_rts.c"
  52. #include "../reclaim.c"
  53. #include "../typd_mlc.c"
  54. #include "../misc.c"
  55. #include "../os_dep.c"
  56. #include "../thread_local_alloc.c"
  57. /* Unity specific includes */
  58. #include "../heapsections.c"
  59. #include "../vector_mlc.c"
  60. /* Most platform-specific files go here... */
  61. #include "../darwin_stop_world.c"
  62. #include "../dyn_load.c"
  63. #include "../gc_dlopen.c"
  64. #if !defined(PLATFORM_MACH_DEP)
  65. #include "../mach_dep.c"
  66. #endif
  67. #if !defined(PLATFORM_STOP_WORLD)
  68. #include "../pthread_stop_world.c"
  69. #endif
  70. #include "../pthread_support.c"
  71. #include "../specific.c"
  72. #include "../win32_threads.c"
  73. #ifndef GC_PTHREAD_START_STANDALONE
  74. # include "../pthread_start.c"
  75. #endif
  76. /* Restore pthread calls redirection (if altered in */
  77. /* pthread_stop_world.c, pthread_support.c or win32_threads.c). */
  78. /* This is only useful if directly included from application */
  79. /* (instead of linking gc). */
  80. #ifndef GC_NO_THREAD_REDIRECTS
  81. # define GC_PTHREAD_REDIRECTS_ONLY
  82. # include "gc_pthread_redirects.h"
  83. #endif
  84. /* The files from "extra" folder are not included. */