Bläddra i källkod

Now uses threaded collector.
Fixed atomic_ops includes path.
Use parallel marking (multi-core collection)
Fixed Linux compile issues.
Ignore x64 files suffixes.

woollybah 11 år sedan
förälder
incheckning
1e04b940de
5 ändrade filer med 13 tillägg och 4 borttagningar
  1. 2 0
      .gitignore
  2. 2 2
      appstub.mod/appstub.linux.c
  3. 4 1
      blitz.mod/blitz.bmx
  4. 1 1
      blitz.mod/blitz.h
  5. 4 0
      blitz.mod/blitz_gc.c

+ 2 - 0
.gitignore

@@ -2,5 +2,7 @@
 *.x86.a
 *.x86.i
 *.bak
+*.x64.a
+*.x64.i
 
 .bmx/

+ 2 - 2
appstub.mod/appstub.linux.c

@@ -3,7 +3,7 @@
 
 #include <signal.h>
 
-void __bb_appstub_appstub();
+void __bb_brl_appstub_appstub();
 
 int main( int argc,char *argv[] ){
 
@@ -11,7 +11,7 @@ int main( int argc,char *argv[] ){
 	
 	bbStartup( argc,argv,0,0 );
 	
-	__bb_appstub_appstub();
+	__bb_brl_appstub_appstub();
 
 	return 0;
 }

+ 4 - 1
blitz.mod/blitz.bmx

@@ -46,6 +46,8 @@ ModuleInfo "History: Lotsa little tidyups"
 ModuleInfo "History: 1.04 Release"
 ModuleInfo "History: Fixed C Compiler warnings"
 
+ModuleInfo "CC_OPTS: -DGC_THREADS -DPARALLEL_MARK"
+
 Import "blitz_app.c"
 Import "blitz_types.c"
 Import "blitz_cclib.c"
@@ -85,7 +87,7 @@ Import "blitz_gc.c"
 '?
 
 Import "bdwgc/include/*.h"
-Import "bdwgc/libatomic_ops-1.2/src/*.h"
+Import "bdwgc/libatomic_ops/src/*.h"
 Import "bdwgc/reclaim.c"
 Import "bdwgc/allchblk.c"
 Import "bdwgc/misc.c"
@@ -106,6 +108,7 @@ Import "bdwgc/dbg_mlc.c"
 Import "bdwgc/malloc.c"
 Import "bdwgc/stubborn.c"
 Import "bdwgc/checksums.c"
+Import "bdwgc/pthread_start.c"
 Import "bdwgc/pthread_support.c"
 Import "bdwgc/pthread_stop_world.c"
 Import "bdwgc/darwin_stop_world.c"

+ 1 - 1
blitz.mod/blitz.h

@@ -260,7 +260,7 @@ void bbStartup( int argc,char *argv[],void *dummy1,void *dummy2 ){
 	char lnk[PATH_MAX];
 	pid_t pid;
 	
-	asm( "movl %%ebp,%0;":"=r"(ebp) );//::"%ebp" );
+	// asm( "movl %%ebp,%0;":"=r"(ebp) );//::"%ebp" );
 	
 	bbGCStackTop=ebp+28;
 	

+ 4 - 0
blitz.mod/blitz_gc.c

@@ -64,3 +64,7 @@ void bbGCSuspend(){
 void bbGCResume(){
 	GC_enable();
 }
+
+int bbGCMemAlloced(){
+	return GC_get_heap_size();
+}