[uim-commit] r1010 - branches/r5rs/sigscheme

tkng at freedesktop.org tkng at freedesktop.org
Sat Jul 23 20:05:09 EST 2005


Author: tkng
Date: 2005-07-23 03:05:04 -0700 (Sat, 23 Jul 2005)
New Revision: 1010

Modified:
   branches/r5rs/sigscheme/datas.c
Log:
* sigscheme/datas.c: Removed all #ifdef USE_BOEHM_GC. They were experimental
  code, should not be committed.


Modified: branches/r5rs/sigscheme/datas.c
===================================================================
--- branches/r5rs/sigscheme/datas.c	2005-07-23 01:11:14 UTC (rev 1009)
+++ branches/r5rs/sigscheme/datas.c	2005-07-23 10:05:04 UTC (rev 1010)
@@ -59,10 +59,6 @@
 #include <stdlib.h>
 #include <malloc.h>
 
-#ifdef USE_BOEHM_GC
-  #include <gc/gc.h>
-#endif
-
 /*=======================================
   Local Include
 =======================================*/
@@ -85,21 +81,12 @@
 =======================================*/
 #define NAMEHASH_SIZE 1024
 
-#ifdef USE_BOEHM_GC
-
 #define SCM_NEW_OBJ_INTERNAL(VALNAME)                                   \
-  VALNAME = GC_MALLOC(sizeof(ScmObjInternal));
-
-#else
-
-#define SCM_NEW_OBJ_INTERNAL(VALNAME)                                   \
     if (EQ(scm_freelist, SCM_NIL))					\
 	gc_mark_and_sweep();						\
     VALNAME = scm_freelist;						\
     scm_freelist = SCM_FREECELL_CDR(scm_freelist);			\
 
-#endif
-
 /*=======================================
   Variable Declarations
 =======================================*/
@@ -147,39 +134,22 @@
 =======================================*/
 void SigScm_InitStorage(void)
 {
-#ifdef USE_BOEHM_GC
-  GC_enable_incremental();
-#endif
-
   allocate_heap(&scm_heaps, scm_heap_num, SCM_HEAP_SIZE, &scm_freelist);
   initialize_symbol_hash();
 }
 
 void SigScm_FinalizeStorage(void)
 {
-#ifdef USE_BOEHM_GC
-  /*    GC_invoke_finalizers(); */
-#else 
     finalize_heap();
     finalize_symbol_hash();
-#endif
 }
 
 static void *malloc_aligned(size_t size)
 {
-
-#ifdef USE_BOEHM_GC
-  return  GC_MALLOC(size);
-
-#else
-
     /* TODO : Need to reserch System Dependency! */
     void *p;
     posix_memalign(&p, 16, size);
     return p;
-
-#endif
-
 }
 
 
@@ -190,10 +160,6 @@
     ScmObj prev = NULL;
     ScmObj next = NULL;
 
-#ifdef USE_BOEHM_GC
-    return;
-#endif
-
 #if DEBUG_GC
     printf("allocate_heap num:%d size:%d\n", num_heap, HEAP_SIZE);
 #endif
@@ -303,11 +269,6 @@
     printf("[ gc start ]\n");
 #endif
 
-#ifdef USE_BOEHM_GC
-
-    return;
-#endif
-
     gc_preprocess();
     gc_mark();
     gc_sweep();
@@ -794,7 +755,6 @@
         sym = SCM_CAR(list);
 
         if (strcmp(SCM_SYMBOL_NAME(sym), name) == 0) {
-            free(symname);
             return sym;
         }
     }



More information about the uim-commit mailing list