summaryrefslogtreecommitdiff
path: root/os_dep.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-04-10 11:46:46 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:57 +0200
commit46d9ecc60ccbb905b225e5ae45386dd439ac7aec (patch)
tree35c32b0758035fa0776aef8497c4010b10a7d93b /os_dep.c
parent9b0ac2ae937436c7704041013fd0d57b36aeff32 (diff)
2011-04-10 Ivan Maidanski <ivmai@mail.ru>
* gcj_mlc.c (GC_gcj_malloc_initialized): Use STATIC unless GC_ASSERTIONS. * include/private/gc_priv.h (GC_gcj_malloc_initialized): Don't declare (as external) unless GC_ASSERTIONS. * os_dep.c (GC_win32_free_heap): Clear GC_heap_bases[] also for Cygwin; add FIXME. * include/private/gcconfig.h: Include <sys/unistd.h> for RTEMS. * include/private/gcconfig.h: Add "#error" for every "-->" mark. * include/private/gcconfig.h (CLEAR_DOUBLE): Turn the code into an expression. * include/private/pthread_support.h (SUSPENDED_EXT): Add new flag (which existed previously as SUSPENDED and still exists in GCJ). * include/private/pthread_support.h (DISABLED_GC): Change the value (as it is already used by SUSPENDED_EXT).
Diffstat (limited to 'os_dep.c')
-rw-r--r--os_dep.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/os_dep.c b/os_dep.c
index 9fa42a5..eed14b8 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -2257,13 +2257,18 @@ void * os2_alloc(size_t bytes)
GC_API void GC_CALL GC_win32_free_heap(void)
{
# ifndef CYGWIN32
- if (GC_no_win32_dlls) {
- while (GC_n_heap_bases > 0) {
- GlobalFree (GC_heap_bases[--GC_n_heap_bases]);
- GC_heap_bases[GC_n_heap_bases] = 0;
- }
- }
+ if (GC_no_win32_dlls)
# endif
+ {
+ while (GC_n_heap_bases-- > 0) {
+# ifdef CYGWIN32
+ /* FIXME: Is it ok to use non-GC free() here? */
+# else
+ GlobalFree(GC_heap_bases[GC_n_heap_bases]);
+# endif
+ GC_heap_bases[GC_n_heap_bases] = 0;
+ }
+ }
}
#endif /* MSWIN32 || CYGWIN32 */