[BACK]Return to gc-7.4.2-risa.diff CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2018

File: [local] / OpenXM_contrib2 / asir2018 / Attic / gc-7.4.2-risa.diff (download)

Revision 1.2, Wed Mar 27 07:40:40 2019 UTC (5 years, 1 month ago) by ohara
Branch: MAIN
Changes since 1.1: +12 -33 lines

Synchronized to asir2000/gc-7.0-risa.diff.

diff -urN gc-7.4.2.orig/NT_STATIC_THREADS_MAKEFILE gc-7.4.2/NT_STATIC_THREADS_MAKEFILE
--- gc-7.4.2.orig/NT_STATIC_THREADS_MAKEFILE	2014-06-03 15:08:01.000000000 +0900
+++ gc-7.4.2/NT_STATIC_THREADS_MAKEFILE	2019-03-27 16:28:15.790694000 +0900
@@ -3,7 +3,11 @@
 
 MY_CPU=X86
 CPU=$(MY_CPU)
-!include <ntwin32.mak>
+#!include <ntwin32.mak>
+cc=cl
+cdebug=-Ox -DNDEBUG
+cflags=-c -nologo -GS -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -D_X86_=1  -DWIN32 -D_WIN32 -W3 -D_WINNT -DLARGE_CONFIG
+cvarsmt= -D_MT -MT
 
 # Make sure that .cc is not viewed as a suffix.  It is for VC++2005, but
 # not earlier versions.  We can deal with either, but not inconsistency.
diff -urN gc-7.4.2.orig/NT_X64_STATIC_THREADS_MAKEFILE gc-7.4.2/NT_X64_STATIC_THREADS_MAKEFILE
--- gc-7.4.2.orig/NT_X64_STATIC_THREADS_MAKEFILE	2014-06-03 15:08:01.000000000 +0900
+++ gc-7.4.2/NT_X64_STATIC_THREADS_MAKEFILE	2019-03-27 16:27:53.507090000 +0900
@@ -3,7 +3,11 @@
 
 MY_CPU=AMD64
 CPU=$(MY_CPU)
-!include <ntwin32.mak>
+#!include <ntwin32.mak>
+cc=cl
+cdebug=-Ox -DNDEBUG
+cflags=-c -nologo -GS -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -D_AMD64_=1 -DWIN64 -D_WIN64  -DWIN32 -D_WIN32 -D_WINNT -DLARGE_CONFIG
+cvarsmt= -D_MT -MT
 
 # Make sure that .cc is not viewed as a suffix.  It is for VC++2005, but
 # not earlier versions.  We can deal with either, but not inconsistency.
diff -urN gc-7.4.2.orig/alloc.c gc-7.4.2/alloc.c
--- gc-7.4.2.orig/alloc.c	2014-06-03 15:08:01.000000000 +0900
+++ gc-7.4.2/alloc.c	2018-09-27 10:56:21.578349458 +0900
@@ -121,6 +121,7 @@
 #endif
 
 word GC_free_space_divisor = GC_FREE_SPACE_DIVISOR;
+word GC_free_space_numerator = 1;
 
 GC_INNER int GC_CALLBACK GC_never_stop_func(void)
 {
@@ -227,8 +228,8 @@
     total_root_size = 2 * stack_size + GC_root_size;
     scan_size = 2 * GC_composite_in_use + GC_atomic_in_use / 4
                 + total_root_size;
-    result = scan_size / GC_free_space_divisor;
-    if (GC_incremental) {
+    result = scan_size * GC_free_space_numerator / GC_free_space_divisor;
+    if (1 || GC_incremental) {
       result /= 2;
     }
     return result > 0 ? result : 1;
@@ -1215,6 +1216,9 @@
     if (GC_on_heap_resize)
       (*GC_on_heap_resize)(GC_heapsize);
 
+#if defined(VISUAL)
+    SendHeapSize();
+#endif
     return(TRUE);
 }
 
@@ -1276,7 +1280,7 @@
       }
     }
 
-    blocks_to_get = GC_heapsize/(HBLKSIZE*GC_free_space_divisor)
+    blocks_to_get = GC_heapsize * GC_free_space_numerator /(HBLKSIZE*GC_free_space_divisor)
                         + needed_blocks;
     if (blocks_to_get > MAXHINCR) {
       word slop;
diff -urN gc-7.4.2.orig/include/private/gcconfig.h gc-7.4.2/include/private/gcconfig.h
--- gc-7.4.2.orig/include/private/gcconfig.h	2014-06-03 15:08:02.000000000 +0900
+++ gc-7.4.2/include/private/gcconfig.h	2018-09-27 10:51:50.388875287 +0900
@@ -2622,6 +2622,7 @@
 #if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \
                              || defined(OPENBSD) || defined(ARM32) \
                              || defined(MIPS) || defined(AVR32))) \
+     || (defined(FREEBSD) && defined(__FreeBSD__) && __FreeBSD__ < 5) \
      || (defined(LINUX) && (defined(SPARC) || defined(M68K))) \
      || ((defined(RTEMS) || defined(PLATFORM_ANDROID)) && defined(I386))) \
     && !defined(NO_GETCONTEXT)