This commit was generated by cvs2svn to compensate for changes in r42373,

which included commits to RCS files with non-trunk default branches.

From-SVN: r42374
This commit is contained in:
Bryce McKinlay 2001-05-21 07:39:25 +01:00
parent f54d42879f
commit abdbd4a8ec
11 changed files with 1850 additions and 1128 deletions

View File

@ -1,5 +1,6 @@
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.10
# ** DO NOT EDIT **
# This has been hand-edited way too many times.
# A clean, manually generated makefile would be an improvement.
# TARGTYPE "Win32 (x86) Application" 0x0101
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
@ -72,6 +73,8 @@ CLEAN :
-@erase ".\Release\finalize.obj"
-@erase ".\Release\finalize.sbr"
-@erase ".\Release\gc.bsc"
-@erase ".\Release\gc_cpp.obj"
-@erase ".\Release\gc_cpp.sbr"
-@erase ".\Release\gc.dll"
-@erase ".\Release\gc.exp"
-@erase ".\Release\gc.lib"
@ -111,8 +114,8 @@ CLEAN :
CPP=cl.exe
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "SILENT" /D "GC_BUILD" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "WIN32_THREADS" /FR /YX /c
CPP_PROJ=/nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "SILENT" /D "GC_BUILD" /D\
# ADD CPP /nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "SILENT" /D "GC_BUILD" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "WIN32_THREADS" /FR /YX /c
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "SILENT" /D "GC_BUILD" /D\
"WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D\
"WIN32_THREADS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/gc.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\Release/
@ -155,6 +158,7 @@ BSC32_SBRS= \
".\Release\dbg_mlc.sbr" \
".\Release\dyn_load.sbr" \
".\Release\finalize.sbr" \
".\Release\gc_cpp.sbr" \
".\Release\headers.sbr" \
".\Release\mach_dep.sbr" \
".\Release\malloc.sbr" \
@ -192,6 +196,7 @@ LINK32_OBJS= \
".\Release\dbg_mlc.obj" \
".\Release\dyn_load.obj" \
".\Release\finalize.obj" \
".\Release\gc_cpp.obj" \
".\Release\headers.obj" \
".\Release\mach_dep.obj" \
".\Release\malloc.obj" \
@ -245,6 +250,8 @@ CLEAN :
-@erase ".\Debug\dyn_load.sbr"
-@erase ".\Debug\finalize.obj"
-@erase ".\Debug\finalize.sbr"
-@erase ".\Debug\gc_cpp.obj"
-@erase ".\Debug\gc_cpp.sbr"
-@erase ".\Debug\gc.bsc"
-@erase ".\Debug\gc.dll"
-@erase ".\Debug\gc.exp"
@ -289,8 +296,8 @@ CLEAN :
CPP=cl.exe
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "SILENT" /D "GC_BUILD" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "WIN32_THREADS" /FR /YX /c
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "SILENT" /D "GC_BUILD"\
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I include /D "_DEBUG" /D "SILENT" /D "GC_BUILD" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "WIN32_THREADS" /FR /YX /c
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I include /D "_DEBUG" /D "SILENT" /D "GC_BUILD"\
/D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D\
"WIN32_THREADS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/gc.pch" /YX /Fo"$(INTDIR)/"\
/Fd"$(INTDIR)/" /c
@ -334,6 +341,7 @@ BSC32_SBRS= \
".\Debug\dbg_mlc.sbr" \
".\Debug\dyn_load.sbr" \
".\Debug\finalize.sbr" \
".\Debug\gc_cpp.sbr" \
".\Debug\headers.sbr" \
".\Debug\mach_dep.sbr" \
".\Debug\malloc.sbr" \
@ -371,6 +379,7 @@ LINK32_OBJS= \
".\Debug\dbg_mlc.obj" \
".\Debug\dyn_load.obj" \
".\Debug\finalize.obj" \
".\Debug\gc_cpp.obj" \
".\Debug\headers.obj" \
".\Debug\mach_dep.obj" \
".\Debug\malloc.obj" \
@ -416,10 +425,13 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
test.c : tests\test.c
copy tests\test.c test.c
CPP=cl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "WIN32_THREADS" /YX /c
CPP_PROJ=/nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D\
# ADD CPP /nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "WIN32_THREADS" /YX /c
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D\
"ALL_INTERIOR_POINTERS" /D "__STDC__" /D "WIN32_THREADS"\
/Fp"$(INTDIR)/gctest.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\gctest\Release/
@ -505,7 +517,7 @@ CLEAN :
CPP=cl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "WIN32_THREADS" /FR /YX /c
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS"\
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I include /D "_DEBUG" /D "WIN32" /D "_WINDOWS"\
/D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "WIN32_THREADS" /FR"$(INTDIR)/"\
/Fp"$(INTDIR)/gctest.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
CPP_OBJS=.\gctest\Debug/
@ -596,7 +608,7 @@ CLEAN :
CPP=cl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /YX /c
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D\
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "." /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D\
"ALL_INTERIOR_POINTERS" /Fp"$(INTDIR)/cord.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\cord\Release/
CPP_SBRS=.\.
@ -688,7 +700,7 @@ CLEAN :
CPP=cl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /YX /c
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /D "_DEBUG" /D "WIN32" /D\
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I include /D "_DEBUG" /D "WIN32" /D\
"_WINDOWS" /D "ALL_INTERIOR_POINTERS" /Fp"$(INTDIR)/cord.pch" /YX\
/Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
CPP_OBJS=.\cord\Debug/
@ -763,15 +775,65 @@ LINK32_OBJS= \
################################################################################
# Begin Source File
SOURCE=.\gc_cpp.cpp
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_RECLA=\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
".\include\gc_cpp.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_RECLA=\
".\th\PCR_Th.h"\
".\th\PCR_ThCrSec.h"\
".\th\PCR_ThCtl.h"\
".\Release\gc_cpp.obj" : $(SOURCE) $(DEP_CPP_RECLA) "$(INTDIR)"
".\Release\gc_cpp.sbr" : $(SOURCE) $(DEP_CPP_RECLA) "$(INTDIR)"
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_RECLA=\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
".\include\gc_cpp.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_RECLA=\
".\th\PCR_Th.h"\
".\th\PCR_ThCrSec.h"\
".\th\PCR_ThCtl.h"\
".\Debug\gc_cpp.obj" : $(SOURCE) $(DEP_CPP_RECLA) "$(INTDIR)"
".\Debug\gc_cpp.sbr" : $(SOURCE) $(DEP_CPP_RECLA) "$(INTDIR)"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\reclaim.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_RECLA=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_RECLA=\
@ -788,10 +850,10 @@ NODEP_CPP_RECLA=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_RECLA=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_RECLA=\
@ -808,6 +870,7 @@ NODEP_CPP_RECLA=\
!ENDIF
# End Source File
################################################################################
# Begin Source File
@ -816,10 +879,10 @@ SOURCE=.\os_dep.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_OS_DE=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\STAT.H"\
{$(INCLUDE)}"\sys\TYPES.H"\
@ -840,10 +903,10 @@ NODEP_CPP_OS_DE=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_OS_DE=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\STAT.H"\
{$(INCLUDE)}"\sys\TYPES.H"\
@ -872,10 +935,10 @@ SOURCE=.\misc.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_MISC_=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_MISC_=\
@ -893,10 +956,10 @@ NODEP_CPP_MISC_=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_MISC_=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_MISC_=\
@ -922,10 +985,10 @@ SOURCE=.\mark_rts.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_MARK_=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_MARK_=\
@ -942,10 +1005,10 @@ NODEP_CPP_MARK_=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_MARK_=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_MARK_=\
@ -970,10 +1033,10 @@ SOURCE=.\mach_dep.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_MACH_=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_MACH_=\
@ -990,10 +1053,10 @@ NODEP_CPP_MACH_=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_MACH_=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_MACH_=\
@ -1018,10 +1081,10 @@ SOURCE=.\headers.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_HEADE=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_HEADE=\
@ -1038,10 +1101,10 @@ NODEP_CPP_HEADE=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_HEADE=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_HEADE=\
@ -1066,10 +1129,10 @@ SOURCE=.\alloc.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_ALLOC=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_ALLOC=\
@ -1086,10 +1149,10 @@ NODEP_CPP_ALLOC=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_ALLOC=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_ALLOC=\
@ -1114,10 +1177,10 @@ SOURCE=.\allchblk.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_ALLCH=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_ALLCH=\
@ -1134,10 +1197,10 @@ NODEP_CPP_ALLCH=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_ALLCH=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_ALLCH=\
@ -1162,10 +1225,10 @@ SOURCE=.\stubborn.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_STUBB=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_STUBB=\
@ -1182,10 +1245,10 @@ NODEP_CPP_STUBB=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_STUBB=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_STUBB=\
@ -1210,10 +1273,10 @@ SOURCE=.\obj_map.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_OBJ_M=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_OBJ_M=\
@ -1230,10 +1293,10 @@ NODEP_CPP_OBJ_M=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_OBJ_M=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_OBJ_M=\
@ -1258,10 +1321,10 @@ SOURCE=.\new_hblk.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_NEW_H=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_NEW_H=\
@ -1278,10 +1341,10 @@ NODEP_CPP_NEW_H=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_NEW_H=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_NEW_H=\
@ -1306,11 +1369,12 @@ SOURCE=.\mark.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_MARK_C=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_mark.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_pmark.h"\
".\include\gc_mark.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_MARK_C=\
@ -1327,11 +1391,12 @@ NODEP_CPP_MARK_C=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_MARK_C=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_mark.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_pmark.h"\
".\include\gc_mark.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_MARK_C=\
@ -1356,10 +1421,10 @@ SOURCE=.\malloc.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_MALLO=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_MALLO=\
@ -1376,10 +1441,10 @@ NODEP_CPP_MALLO=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_MALLO=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_MALLO=\
@ -1404,10 +1469,10 @@ SOURCE=.\mallocx.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_MALLX=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_MALLX=\
@ -1424,10 +1489,10 @@ NODEP_CPP_MALLX=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_MALLX=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_MALLX=\
@ -1452,11 +1517,12 @@ SOURCE=.\finalize.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_FINAL=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_mark.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_pmark.h"\
".\include\gc_mark.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_FINAL=\
@ -1473,11 +1539,12 @@ NODEP_CPP_FINAL=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_FINAL=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_mark.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_pmark.h"\
".\include\gc_mark.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_FINAL=\
@ -1502,10 +1569,10 @@ SOURCE=.\dbg_mlc.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_DBG_M=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_DBG_M=\
@ -1522,10 +1589,10 @@ NODEP_CPP_DBG_M=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_DBG_M=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_DBG_M=\
@ -1550,10 +1617,10 @@ SOURCE=.\blacklst.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_BLACK=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_BLACK=\
@ -1570,10 +1637,10 @@ NODEP_CPP_BLACK=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_BLACK=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_BLACK=\
@ -1598,12 +1665,13 @@ SOURCE=.\typd_mlc.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_TYPD_=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_mark.h"\
".\gc_priv.h"\
".\gc_typed.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_pmark.h"\
".\include\gc_mark.h"\
".\include\private\gc_priv.h"\
".\include\gc_typed.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_TYPD_=\
@ -1620,12 +1688,13 @@ NODEP_CPP_TYPD_=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_TYPD_=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_mark.h"\
".\gc_priv.h"\
".\gc_typed.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_pmark.h"\
".\include\gc_mark.h"\
".\include\private\gc_priv.h"\
".\include\gc_typed.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_TYPD_=\
@ -1650,11 +1719,12 @@ SOURCE=.\ptr_chck.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_PTR_C=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_mark.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_pmark.h"\
".\include\gc_mark.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_PTR_C=\
@ -1671,11 +1741,12 @@ NODEP_CPP_PTR_C=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_PTR_C=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_mark.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_pmark.h"\
".\include\gc_mark.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_PTR_C=\
@ -1700,10 +1771,10 @@ SOURCE=.\dyn_load.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_DYN_L=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\STAT.H"\
{$(INCLUDE)}"\sys\TYPES.H"\
@ -1723,10 +1794,10 @@ NODEP_CPP_DYN_L=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_DYN_L=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\STAT.H"\
{$(INCLUDE)}"\sys\TYPES.H"\
@ -1754,10 +1825,10 @@ SOURCE=.\win32_threads.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_WIN32=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_WIN32=\
@ -1774,10 +1845,10 @@ NODEP_CPP_WIN32=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_WIN32=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_WIN32=\
@ -1802,10 +1873,10 @@ SOURCE=.\checksums.c
!IF "$(CFG)" == "gc - Win32 Release"
DEP_CPP_CHECK=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_CHECK=\
@ -1822,10 +1893,10 @@ NODEP_CPP_CHECK=\
!ELSEIF "$(CFG)" == "gc - Win32 Debug"
DEP_CPP_CHECK=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_CHECK=\
@ -1876,13 +1947,13 @@ NODEP_CPP_CHECK=\
################################################################################
# Begin Source File
SOURCE=.\test.c
SOURCE=.\tests\test.c
DEP_CPP_TEST_=\
".\gcconfig.h"\
".\gc.h"\
".\gc_hdrs.h"\
".\gc_priv.h"\
".\gc_typed.h"\
".\include\private\gcconfig.h"\
".\include\gc.h"\
".\include\private\gc_hdrs.h"\
".\include\private\gc_priv.h"\
".\include\gc_typed.h"\
{$(INCLUDE)}"\sys\TYPES.H"\
NODEP_CPP_TEST_=\
@ -1944,13 +2015,13 @@ NODEP_CPP_TEST_=\
SOURCE=.\cord\de_win.c
DEP_CPP_DE_WI=\
".\cord\cord.h"\
".\include\cord.h"\
".\cord\de_cmds.h"\
".\cord\de_win.h"\
".\cord\private\cord_pos.h"\
".\include\private\cord_pos.h"\
NODEP_CPP_DE_WI=\
".\cord\gc.h"\
".\include\gc.h"\
!IF "$(CFG)" == "cord - Win32 Release"
@ -1975,13 +2046,13 @@ NODEP_CPP_DE_WI=\
SOURCE=.\cord\de.c
DEP_CPP_DE_C2e=\
".\cord\cord.h"\
".\include\cord.h"\
".\cord\de_cmds.h"\
".\cord\de_win.h"\
".\cord\private\cord_pos.h"\
".\include\private\cord_pos.h"\
NODEP_CPP_DE_C2e=\
".\cord\gc.h"\
".\include\gc.h"\
!IF "$(CFG)" == "cord - Win32 Release"
@ -2006,12 +2077,12 @@ NODEP_CPP_DE_C2e=\
SOURCE=.\cord\cordxtra.c
DEP_CPP_CORDX=\
".\cord\cord.h"\
".\cord\ec.h"\
".\cord\private\cord_pos.h"\
".\include\cord.h"\
".\include\ec.h"\
".\include\private\cord_pos.h"\
NODEP_CPP_CORDX=\
".\cord\gc.h"\
".\include\gc.h"\
!IF "$(CFG)" == "cord - Win32 Release"
@ -2036,11 +2107,11 @@ NODEP_CPP_CORDX=\
SOURCE=.\cord\cordbscs.c
DEP_CPP_CORDB=\
".\cord\cord.h"\
".\cord\private\cord_pos.h"\
".\include\cord.h"\
".\include\private\cord_pos.h"\
NODEP_CPP_CORDB=\
".\cord\gc.h"\
".\include\gc.h"\
!IF "$(CFG)" == "cord - Win32 Release"

View File

@ -14,6 +14,7 @@
# include "cord.h"
# include <string.h>
# include <stdio.h>
# include <stdlib.h>
/* This is a very incomplete test of the cord package. It knows about */
/* a few internals of the package (e.g. when C strings are returned) */
/* that real clients shouldn't rely on. */

View File

@ -29,8 +29,56 @@
#ifndef _GC_H
# define _GC_H
#if defined(_SOLARIS_PTHREADS) && !defined(SOLARIS_THREADS)
# define SOLARIS_THREADS
#endif
/*
* Some tests for old macros. These violate our namespace rules and will
* disappear shortly.
*/
#if defined(SOLARIS_THREADS) || defined(_SOLARIS_THREADS)
# define GC_SOLARIS_THREADS
#endif
#if defined(_SOLARIS_PTHREADS)
# define GC_SOLARIS_PTHREADS
#endif
#if defined(IRIX_THREADS)
# define GC_IRIX_THREADS
#endif
#if defined(HPUX_THREADS)
# define GC_HPUX_THREADS
#endif
#if defined(OSF1_THREADS)
# define GC_OSF1_THREADS
#endif
#if defined(LINUX_THREADS)
# define GC_LINUX_THREADS
#endif
#if defined(WIN32_THREADS)
# define GC_WIN32_THREADS
#endif
#if defined(USE_LD_WRAP)
# define GC_USE_LD_WRAP
#endif
#if !defined(_REENTRANT) && (defined(GC_SOLARIS_THREADS) \
|| defined(GC_SOLARIS_PTHREADS) \
|| defined(GC_HPUX_THREADS) \
|| defined(GC_LINUX_THREADS))
# define _REENTRANT
/* Better late than never. This fails if system headers that */
/* depend on this were previously included. */
#endif
# define __GC
# include <stddef.h>
# ifdef _WIN32_WCE
/* Yet more kluges for WinCE */
# include <stdlib.h> /* size_t is defined here */
typedef long ptrdiff_t; /* ptrdiff_t is not defined */
# endif
#if defined(__CYGWIN32__) && defined(GC_USE_DLL)
#include "libgc_globals.h"
@ -44,9 +92,10 @@
# endif
#endif
#if defined(_MSC_VER) && defined(_DLL)
#if defined(_MSC_VER) && (defined(_DLL) && !defined(NOT_GC_DLL) \
|| defined(GC_DLL))
# ifdef GC_BUILD
# define GC_API __declspec(dllexport)
# define GC_API extern __declspec(dllexport)
# else
# define GC_API __declspec(dllimport)
# endif
@ -94,6 +143,16 @@ typedef long GC_signed_word;
GC_API GC_word GC_gc_no;/* Counter incremented per collection. */
/* Includes empty GCs at startup. */
GC_API int GC_parallel; /* GC is parallelized for performance on */
/* multiprocessors. Currently set only */
/* implicitly if collector is built with */
/* -DPARALLEL_MARK and if either: */
/* Env variable GC_NPROC is set to > 1, or */
/* GC_NPROC is not set and this is an MP. */
/* If GC_parallel is set, incremental */
/* collection is aonly partially functional, */
/* and may not be desirable. */
/* Public R/W variables */
@ -113,6 +172,18 @@ GC_API int GC_find_leak;
/* deallocated with GC_free. Initial value */
/* is determined by FIND_LEAK macro. */
GC_API int GC_all_interior_pointers;
/* Arrange for pointers to object interiors to */
/* be recognized as valid. May not be changed */
/* after GC initialization. */
/* Initial value is determined by */
/* -DALL_INTERIOR_POINTERS. */
/* Unless DONT_ADD_BYTE_AT_END is defined, this */
/* also affects whether sizes are increased by */
/* at least a byte to allow "off the end" */
/* pointer recognition. */
/* MUST BE 0 or 1. */
GC_API int GC_quiet; /* Disable statistics output. Only matters if */
/* collector has been compiled with statistics */
/* enabled. This involves a performance cost, */
@ -120,7 +191,7 @@ GC_API int GC_quiet; /* Disable statistics output. Only matters if */
GC_API int GC_finalize_on_demand;
/* If nonzero, finalizers will only be run in */
/* response to an eplit GC_invoke_finalizers */
/* response to an explicit GC_invoke_finalizers */
/* call. The default is determined by whether */
/* the FINALIZE_ON_DEMAND macro is defined */
/* when the collector is built. */
@ -132,6 +203,15 @@ GC_API int GC_java_finalization;
/* ordered finalization. Default value is */
/* determined by JAVA_FINALIZATION macro. */
GC_API void (* GC_finalizer_notifier)();
/* Invoked by the collector when there are */
/* objects to be finalized. Invoked at most */
/* once per GC cycle. Never invoked unless */
/* GC_finalize_on_demand is set. */
/* Typically this will notify a finalization */
/* thread, which will call GC_invoke_finalizers */
/* in response. */
GC_API int GC_dont_gc; /* Dont collect unless explicitly requested, e.g. */
/* because it's not safe. */
@ -163,6 +243,16 @@ GC_API int GC_full_freq; /* Number of partial collections between */
GC_API GC_word GC_non_gc_bytes;
/* Bytes not considered candidates for collection. */
/* Used only to control scheduling of collections. */
/* Updated by GC_malloc_uncollectable and GC_free. */
/* Wizards only. */
GC_API int GC_no_dls;
/* Don't register dynamic library data segments. */
/* Wizards only. Should be used only if the */
/* application explicitly registers all roots. */
/* In Microsoft Windows environments, this will */
/* usually also prevent registration of the */
/* main data segment as part of the root set. */
GC_API GC_word GC_free_space_divisor;
/* We try to make sure that we allocate at */
@ -193,8 +283,16 @@ GC_API char *GC_stackbottom; /* Cool end of user stack. */
/* automatically. */
/* For multithreaded code, this is the */
/* cold end of the stack for the */
/* primordial thread. */
/* primordial thread. */
GC_API int GC_dont_precollect; /* Don't collect as part of */
/* initialization. Should be set only */
/* if the client wants a chance to */
/* manually initialize the root set */
/* before the first collection. */
/* Interferes with blacklisting. */
/* Wizards only. */
/* Public procedures */
/*
* general purpose allocation routines, with roughly malloc calling conv.
@ -204,8 +302,13 @@ GC_API char *GC_stackbottom; /* Cool end of user stack. */
* will occur after GC_end_stubborn_change has been called on the
* result of GC_malloc_stubborn. GC_malloc_uncollectable allocates an object
* that is scanned for pointers to collectable objects, but is not itself
* collectable. GC_malloc_uncollectable and GC_free called on the resulting
* collectable. The object is scanned even if it does not appear to
* be reachable. GC_malloc_uncollectable and GC_free called on the resulting
* object implicitly update GC_non_gc_bytes appropriately.
*
* Note that the GC_malloc_stubborn support is stubbed out by default
* starting in 6.0. GC_malloc_stubborn is an alias for GC_malloc unless
* the collector is built with STUBBORN_ALLOC defined.
*/
GC_API GC_PTR GC_malloc GC_PROTO((size_t size_in_bytes));
GC_API GC_PTR GC_malloc_atomic GC_PROTO((size_t size_in_bytes));
@ -331,12 +434,18 @@ GC_API size_t GC_get_free_bytes GC_PROTO((void));
/* Return the number of bytes allocated since the last collection. */
GC_API size_t GC_get_bytes_since_gc GC_PROTO((void));
/* Return the total number of bytes allocated in this process. */
/* Never decreases. */
GC_API size_t GC_get_total_bytes GC_PROTO((void));
/* Enable incremental/generational collection. */
/* Not advisable unless dirty bits are */
/* available or most heap objects are */
/* pointerfree(atomic) or immutable. */
/* Don't use in leak finding mode. */
/* Ignored if GC_dont_gc is true. */
/* Only the generational piece of this is */
/* functional if GC_parallel is TRUE. */
GC_API void GC_enable_incremental GC_PROTO((void));
/* Perform some garbage collection work, if appropriate. */
@ -497,6 +606,8 @@ GC_API void GC_debug_register_finalizer
/* but it's unavoidable for C++, since the compiler may */
/* silently introduce these. It's also benign in that specific */
/* case. */
/* Note that cd will still be viewed as accessible, even if it */
/* refers to the object itself. */
GC_API void GC_register_finalizer_ignore_self
GC_PROTO((GC_PTR obj, GC_finalization_proc fn, GC_PTR cd,
GC_finalization_proc *ofn, GC_PTR *ocd));
@ -505,7 +616,9 @@ GC_API void GC_debug_register_finalizer_ignore_self
GC_finalization_proc *ofn, GC_PTR *ocd));
/* Another version of the above. It ignores all cycles. */
/* It should probably only be used by Java implementations. */
/* It should probably only be used by Java implementations. */
/* Note that cd will still be viewed as accessible, even if it */
/* refers to the object itself. */
GC_API void GC_register_finalizer_no_order
GC_PROTO((GC_PTR obj, GC_finalization_proc fn, GC_PTR cd,
GC_finalization_proc *ofn, GC_PTR *ocd));
@ -608,6 +721,9 @@ typedef GC_PTR (*GC_fn_type) GC_PROTO((GC_PTR client_data));
GC_API GC_PTR GC_call_with_alloc_lock
GC_PROTO((GC_fn_type fn, GC_PTR client_data));
/* The following routines are primarily intended for use with a */
/* preprocessor which inserts calls to check C pointer arithmetic. */
/* Check that p and q point to the same object. */
/* Fail conspicuously if they don't. */
/* Returns the first argument. */
@ -635,7 +751,7 @@ GC_API GC_PTR GC_is_visible GC_PROTO((GC_PTR p));
/* Check that if p is a pointer to a heap page, then it points to */
/* a valid displacement within a heap object. */
/* Fail conspicuously if this property does not hold. */
/* Uninteresting with ALL_INTERIOR_POINTERS. */
/* Uninteresting with GC_all_interior_pointers. */
/* Always returns its argument. */
GC_API GC_PTR GC_is_valid_displacement GC_PROTO((GC_PTR p));
@ -651,9 +767,9 @@ GC_API GC_PTR GC_is_valid_displacement GC_PROTO((GC_PTR p));
# ifdef __GNUC__
# define GC_PTR_ADD(x, n) \
GC_PTR_ADD3(x, n, typeof(x))
# define GC_PRE_INCR(x, n) \
# define GC_PRE_INCR(x, n) \
GC_PRE_INCR3(x, n, typeof(x))
# define GC_POST_INCR(x, n) \
# define GC_POST_INCR(x, n) \
GC_POST_INCR3(x, typeof(x))
# else
/* We can't do this right without typeof, which ANSI */
@ -693,76 +809,28 @@ GC_API void (*GC_is_valid_displacement_print_proc)
GC_API void (*GC_is_visible_print_proc)
GC_PROTO((GC_PTR p));
#if defined(_SOLARIS_PTHREADS) && !defined(SOLARIS_THREADS)
# define SOLARIS_THREADS
/* For pthread support, we generally need to intercept a number of */
/* thread library calls. We do that here by macro defining them. */
#if !defined(GC_USE_LD_WRAP) && \
(defined(GC_LINUX_THREADS) || defined(GC_HPUX_THREADS) || \
defined(GC_IRIX_THREADS) || defined(GC_SOLARIS_PTHREADS) || \
defined(GC_SOLARIS_THREADS) || defined(GC_OSF1_THREADS))
# include "gc_pthread_redirects.h"
#endif
#ifdef SOLARIS_THREADS
/* We need to intercept calls to many of the threads primitives, so */
/* that we can locate thread stacks and stop the world. */
/* Note also that the collector cannot see thread specific data. */
/* Thread specific data should generally consist of pointers to */
/* uncollectable objects, which are deallocated using the destructor */
/* facility in thr_keycreate. */
# include <thread.h>
# include <signal.h>
int GC_thr_create(void *stack_base, size_t stack_size,
void *(*start_routine)(void *), void *arg, long flags,
thread_t *new_thread);
int GC_thr_join(thread_t wait_for, thread_t *departed, void **status);
int GC_thr_suspend(thread_t target_thread);
int GC_thr_continue(thread_t target_thread);
void * GC_dlopen(const char *path, int mode);
# ifdef _SOLARIS_PTHREADS
# include <pthread.h>
extern int GC_pthread_create(pthread_t *new_thread,
const pthread_attr_t *attr,
void * (*thread_execp)(void *), void *arg);
extern int GC_pthread_join(pthread_t wait_for, void **status);
# undef thread_t
# define pthread_join GC_pthread_join
# define pthread_create GC_pthread_create
#endif
# define thr_create GC_thr_create
# define thr_join GC_thr_join
# define thr_suspend GC_thr_suspend
# define thr_continue GC_thr_continue
# define dlopen GC_dlopen
# endif /* SOLARIS_THREADS */
#if !defined(USE_LD_WRAP) && \
(defined(IRIX_THREADS) || defined(LINUX_THREADS) || defined(HPUX_THREADS))
/* We treat these similarly. */
# include <pthread.h>
# include <signal.h>
int GC_pthread_create(pthread_t *new_thread,
const pthread_attr_t *attr,
void *(*start_routine)(void *), void *arg);
int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
int GC_pthread_join(pthread_t thread, void **retval);
# define pthread_create GC_pthread_create
# define pthread_sigmask GC_pthread_sigmask
# define pthread_join GC_pthread_join
# define dlopen GC_dlopen
#endif /* xxxxx_THREADS */
# if defined(PCR) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || \
defined(IRIX_THREADS) || defined(LINUX_THREADS) || \
defined(IRIX_JDK_THREADS) || defined(HPUX_THREADS)
# if defined(PCR) || defined(GC_SOLARIS_THREADS) || \
defined(GC_SOLARIS_PTHREADS) || defined(GC_WIN32_THREADS) || \
defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \
defined(GC_HPUX_THREADS)
/* Any flavor of threads except SRC_M3. */
/* This returns a list of objects, linked through their first */
/* word. Its use can greatly reduce lock contention problems, since */
/* the allocation lock can be acquired and released many fewer times. */
/* lb must be large enough to hold the pointer field. */
/* It is used internally by gc_local_alloc.h, which provides a simpler */
/* programming interface on Linux. */
GC_PTR GC_malloc_many(size_t lb);
#define GC_NEXT(p) (*(GC_PTR *)(p)) /* Retrieve the next element */
/* in returned list. */
@ -770,6 +838,35 @@ extern void GC_thr_init(); /* Needed for Solaris/X86 */
#endif /* THREADS && !SRC_M3 */
#if defined(WIN32_THREADS) && defined(_WIN32_WCE)
# include <windows.h>
/*
* win32_threads.c implements the real WinMain, which will start a new thread
* to call GC_WinMain after initializing the garbage collector.
*/
int WINAPI GC_WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPWSTR lpCmdLine,
int nCmdShow );
/*
* All threads must be created using GC_CreateThread, so that they will be
* recorded in the thread table.
*/
HANDLE WINAPI GC_CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId );
# ifndef GC_BUILD
# define WinMain GC_WinMain
# define CreateThread GC_CreateThread
# endif
#endif
/*
* If you are planning on putting
* the collector in a SunOS 5 dynamic library, you need to call GC_INIT()
@ -790,13 +887,23 @@ extern void GC_thr_init(); /* Needed for Solaris/X86 */
# endif
#endif
#if (defined(_MSDOS) || defined(_MSC_VER)) && (_M_IX86 >= 300) \
|| defined(_WIN32)
#if !defined(_WIN32_WCE) \
&& ((defined(_MSDOS) || defined(_MSC_VER)) && (_M_IX86 >= 300) \
|| defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__))
/* win32S may not free all resources on process exit. */
/* This explicitly deallocates the heap. */
GC_API void GC_win32_free_heap ();
#endif
#if ( defined(_AMIGA) && !defined(GC_AMIGA_MAKINGLIB) )
/* Allocation really goes through GC_amiga_allocwrapper_do */
# include "gc_amiga_redirects.h"
#endif
#if defined(GC_REDIRECT_TO_LOCAL) && !defined(GC_LOCAL_ALLOC_H)
# include "gc_local_alloc.h"
#endif
#ifdef __cplusplus
} /* end of extern "C" */
#endif

View File

@ -25,6 +25,9 @@
// This uses template classes with static members, and hence does not work
// with g++ 2.7.2 and earlier.
//
// This code assumes that the collector itself has been compiled with a
// compiler that defines __STDC__ .
//
#include "gc.h"

View File

@ -139,7 +139,7 @@ by UseGC. GC is an alias for UseGC, unless GC_NAME_CONFLICT is defined.
#if ! defined( OPERATOR_NEW_ARRAY ) \
&& (__BORLANDC__ >= 0x450 || (__GNUC__ >= 2 && __GNUC_MINOR__ >= 6) \
|| __WATCOMC__ >= 1050)
|| __WATCOMC__ >= 1050 || _MSC_VER >= 1100)
# define OPERATOR_NEW_ARRAY
#endif
@ -179,6 +179,12 @@ private:
extern "C" {typedef void (*GCCleanUpFunc)( void* obj, void* clientData );}
#ifdef _MSC_VER
// Disable warning that "no matching operator delete found; memory will
// not be freed if initialization throws an exception"
# pragma warning(disable:4291)
#endif
inline void* operator new(
size_t size,
GCPlacement gcp,
@ -200,6 +206,49 @@ inline void* operator new(
#ifdef OPERATOR_NEW_ARRAY
#ifdef _MSC_VER
/** This ensures that the system default operator new[] doesn't get
* undefined, which is what seems to happen on VC++ 6 for some reason
* if we define a multi-argument operator new[].
* There seems to be really redirect new in this environment without
* including this everywhere.
*/
inline void *operator new[]( size_t size )
{
return GC_MALLOC_UNCOLLECTABLE( size );
}
inline void operator delete[](void* obj)
{
GC_FREE(obj);
};
inline void* operator new( size_t size)
{
return GC_MALLOC_UNCOLLECTABLE( size);
};
inline void operator delete(void* obj)
{
GC_FREE(obj);
};
// This new operator is used by VC++ in case of Debug builds !
inline void* operator new( size_t size,
int ,//nBlockUse,
const char * szFileName,
int nLine
) {
# ifndef GC_DEBUG
return GC_malloc_uncollectable( size );
# else
return GC_debug_malloc_uncollectable(size, szFileName, nLine);
# endif
}
#endif /* _MSC_VER */
inline void* operator new[](
size_t size,
GCPlacement gcp,

View File

@ -24,6 +24,10 @@
* may be marked by the mark procedure passed to GC_init_gcj_malloc.
*/
#ifndef GC_GCJ_H
#define GC_GCJ_H
#ifndef MARK_DESCR_OFFSET
# define MARK_DESCR_OFFSET sizeof(word)
#endif
@ -41,10 +45,7 @@
#endif
/* The following allocators signal an out of memory condition with */
/* return GC_oom_action(); */
/* The default GC_oom_action returns 0. */
/* This functionality is currently restricted to the gcj allocators. */
/* We may want to extend it to the others. */
/* return GC_oom_fn(bytes); */
extern void * (*GC_oom_action)(void);
@ -58,8 +59,6 @@ extern void * (*GC_oom_action)(void);
/* to use the same mark_proc for some of its generated mark descriptors.*/
/* In that case, it should use a different "environment" value to */
/* detect the presence or absence of the debug header. */
/* the debugging interface. */
/* Mp is really of type mark_proc, as defined in gc_mark.h. We don't */
/* want to include that here for namespace pollution reasons. */
extern void GC_init_gcj_malloc(int mp_index, void * /* really mark_proc */mp);
@ -77,6 +76,9 @@ extern void * GC_debug_gcj_malloc(size_t lb,
/* Similar to the above, but the size is in words, and we don't */
/* adjust it. The size is assumed to be such that it can be */
/* allocated as a small object. */
/* Unless it is known that the collector is not configured */
/* with USE_MARK_BYTES and unless it is known that the object */
/* has weak alignment requirements, lw must be even. */
extern void * GC_gcj_fast_malloc(size_t lw,
void * ptr_to_struct_containing_descr);
extern void * GC_debug_gcj_fast_malloc(size_t lw,
@ -91,11 +93,12 @@ extern void * GC_gcj_malloc_ignore_off_page(size_t lb,
# ifdef GC_DEBUG
# define GC_GCJ_MALLOC(s,d) GC_debug_gcj_malloc(s,d,GC_EXTRAS)
# define GC_GCJ_FAST_MALLOC(s,d) GC_debug_gcj_fast_malloc(s,d,GC_EXTRAS)
# define GC_GCJ_MALLOC_IGNORE_OFF_PAGE(s,d) GC_gcj_debug_malloc(s,d,GC_EXTRAS)
# define GC_GCJ_MALLOC_IGNORE_OFF_PAGE(s,d) GC_debug_gcj_malloc(s,d,GC_EXTRAS)
# else
# define GC_GCJ_MALLOC(s,d) GC_gcj_malloc(s,d)
# define GC_GCJ_FAST_MALLOC(s,d) GC_gcj_fast_malloc(s,d)
# define GC_GCJ_MALLOC_IGNORE_OFF_PAGE(s,d) \
GC_gcj_debug_malloc_ignore_off_page(s,d)
GC_gcj_malloc_ignore_off_page(s,d)
# endif
#endif /* GC_GCJ_H */

View File

@ -17,18 +17,22 @@
# include "private/gc_priv.h"
# endif
/* USE OF THIS FILE IS NOT RECOMMENDED unless the collector has been */
/* compiled without -DALL_INTERIOR_POINTERS or with */
/* USE OF THIS FILE IS NOT RECOMMENDED unless GC_all_interior_pointers */
/* is always set, or the collector has been built with */
/* -DDONT_ADD_BYTE_AT_END, or the specified size includes a pointerfree */
/* word at the end. In the standard collector configuration, */
/* the final word of each object may not be scanned. */
/* This is most useful for compilers that generate C. */
/* This iinterface is most useful for compilers that generate C. */
/* Manual use is hereby discouraged. */
/* Allocate n words (NOT BYTES). X is made to point to the result. */
/* It is assumed that n < MAXOBJSZ, and */
/* that n > 0. On machines requiring double word alignment of some */
/* data, we also assume that n is 1 or even. This bypasses the */
/* data, we also assume that n is 1 or even. */
/* If the collector is built with -DUSE_MARK_BYTES or -DPARALLEL_MARK, */
/* the n = 1 case is also disallowed. */
/* Effectively this means that portable code should make sure n is even.*/
/* This bypasses the */
/* MERGE_SIZES mechanism. In order to minimize the number of distinct */
/* free lists that are maintained, the caller should ensure that a */
/* small number of distinct values of n are used. (The MERGE_SIZES */

View File

@ -20,9 +20,9 @@
// It also doesn't yet understand the new header file names or
// namespaces.
//
// This assumes the collector has been compiled with -DATOMIC_UNCOLLECTABLE
// and -DALL_INTERIOR_POINTERS. We also recommend
// -DREDIRECT_MALLOC=GC_uncollectable_malloc.
// This assumes the collector has been compiled with -DATOMIC_UNCOLLECTABLE.
// The user should also consider -DREDIRECT_MALLOC=GC_uncollectable_malloc,
// to ensure that object allocated through malloc are traced.
//
// Some of this could be faster in the explicit deallocation case.
// In particular, we spend too much time clearing objects on the
@ -43,11 +43,14 @@
// problems. The argument for changing it is that the usual default
// allocator is usually a very bad choice for a garbage collected environment.)
//
// This code assumes that the collector itself has been compiled with a
// compiler that defines __STDC__ .
//
#ifndef GC_ALLOC_H
#include "gc.h"
#include <alloc.h>
#include <stack> // A more portable way to get stl_alloc.h .
#define GC_ALLOC_H
@ -337,6 +340,8 @@ public: \
{ alloc::ptr_free_deallocate(p, sizeof (T)); } \
};
__STL_BEGIN_NAMESPACE
__GC_SPECIALIZE(char, gc_alloc)
__GC_SPECIALIZE(int, gc_alloc)
__GC_SPECIALIZE(unsigned, gc_alloc)
@ -361,6 +366,8 @@ __GC_SPECIALIZE(unsigned, single_client_traceable_alloc)
__GC_SPECIALIZE(float, single_client_traceable_alloc)
__GC_SPECIALIZE(double, single_client_traceable_alloc)
__STL_END_NAMESPACE
#ifdef __STL_USE_STD_ALLOCATORS
__STL_BEGIN_NAMESPACE

View File

@ -24,6 +24,17 @@ typedef struct hblkhdr hdr;
* The 2 level tree data structure that is used to find block headers.
* If there are more than 32 bits in a pointer, the top level is a hash
* table.
*
* This defines HDR, GET_HDR, and SET_HDR, the main macros used to
* retrieve and set object headers. We also define some variants to
* retrieve 2 unrelated headers in interleaved fashion. This
* slightly improves scheduling.
*
* Since 5.0 alpha 5, we can also take advantage of a header lookup
* cache. This is a locally declared direct mapped cache, used inside
* the marker. The HC_GET_HDR and HC_GET_HDR2 macros use and maintain this
* cache. Assuming we get reasonable hit rates, this shaves a few
* memory references from each pointer validation.
*/
# if CPP_WORDSZ > 32
@ -45,6 +56,127 @@ typedef struct hblkhdr hdr;
# define TOP_SZ (1 << LOG_TOP_SZ)
# define BOTTOM_SZ (1 << LOG_BOTTOM_SZ)
#ifndef SMALL_CONFIG
# define USE_HDR_CACHE
#endif
/* #define COUNT_HDR_CACHE_HITS */
extern hdr * GC_invalid_header; /* header for an imaginary block */
/* containing no objects. */
/* Check whether p and corresponding hhdr point to long or invalid */
/* object. If so, advance them to */
/* beginning of block, or set hhdr to GC_invalid_header. */
#define ADVANCE(p, hhdr, source) \
if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) { \
p = GC_FIND_START(p, hhdr, (word)source); \
if (p == 0) { \
hhdr = GC_invalid_header; \
} else { \
hhdr = GC_find_header(p); \
} \
}
#ifdef USE_HDR_CACHE
# ifdef COUNT_HDR_CACHE_HITS
extern word GC_hdr_cache_hits;
extern word GC_hdr_cache_misses;
# define HC_HIT() ++GC_hdr_cache_hits
# define HC_MISS() ++GC_hdr_cache_misses
# else
# define HC_HIT()
# define HC_MISS()
# endif
typedef struct hce {
word block_addr; /* right shifted by LOG_HBLKSIZE */
hdr * hce_hdr;
} hdr_cache_entry;
# define HDR_CACHE_SIZE 8 /* power of 2 */
# define DECLARE_HDR_CACHE \
hdr_cache_entry hdr_cache[HDR_CACHE_SIZE]
# define INIT_HDR_CACHE BZERO(hdr_cache, sizeof(hdr_cache));
# define HCE(h) hdr_cache + (((word)(h) >> LOG_HBLKSIZE) & (HDR_CACHE_SIZE-1))
# define HCE_VALID_FOR(hce,h) ((hce) -> block_addr == \
((word)(h) >> LOG_HBLKSIZE))
# define HCE_HDR(h) ((hce) -> hce_hdr)
/* Analogous to GET_HDR, except that in the case of large objects, it */
/* Returns the header for the object beginning, and updates p. */
/* Returns &GC_bad_header instead of 0. All of this saves a branch */
/* in the fast path. */
# define HC_GET_HDR(p, hhdr, source) \
{ \
hdr_cache_entry * hce = HCE(p); \
if (HCE_VALID_FOR(hce, p)) { \
HC_HIT(); \
hhdr = hce -> hce_hdr; \
} else { \
HC_MISS(); \
GET_HDR(p, hhdr); \
ADVANCE(p, hhdr, source); \
hce -> block_addr = (word)(p) >> LOG_HBLKSIZE; \
hce -> hce_hdr = hhdr; \
} \
}
# define HC_GET_HDR2(p1, hhdr1, source1, p2, hhdr2, source2) \
{ \
hdr_cache_entry * hce1 = HCE(p1); \
hdr_cache_entry * hce2 = HCE(p2); \
if (HCE_VALID_FOR(hce1, p1)) { \
HC_HIT(); \
hhdr1 = hce1 -> hce_hdr; \
} else { \
HC_MISS(); \
GET_HDR(p1, hhdr1); \
ADVANCE(p1, hhdr1, source1); \
hce1 -> block_addr = (word)(p1) >> LOG_HBLKSIZE; \
hce1 -> hce_hdr = hhdr1; \
} \
if (HCE_VALID_FOR(hce2, p2)) { \
HC_HIT(); \
hhdr2 = hce2 -> hce_hdr; \
} else { \
HC_MISS(); \
GET_HDR(p2, hhdr2); \
ADVANCE(p2, hhdr2, source2); \
hce2 -> block_addr = (word)(p2) >> LOG_HBLKSIZE; \
hce2 -> hce_hdr = hhdr2; \
} \
}
#else /* !USE_HDR_CACHE */
# define DECLARE_HDR_CACHE
# define INIT_HDR_CACHE
# define HC_GET_HDR(p, hhdr, source) \
{ \
GET_HDR(p, hhdr); \
ADVANCE(p, hhdr, source); \
}
# define HC_GET_HDR2(p1, hhdr1, source1, p2, hhdr2, source2) \
{ \
GET_HDR2(p1, hhdr1, p2, hhdr2); \
ADVANCE(p1, hhdr1, source1); \
ADVANCE(p2, hhdr2, source2); \
}
#endif
typedef struct bi {
hdr * index[BOTTOM_SZ];
/*
@ -97,6 +229,8 @@ typedef struct bi {
# define GET_HDR(p, hhdr) (hhdr) = HDR(p)
# define SET_HDR(p, hhdr) HDR_INNER(p) = (hhdr)
# define GET_HDR_ADDR(p, ha) (ha) = &(HDR_INNER(p))
# define GET_HDR2(p1, hhdr1, p2, hhdr2) \
{ GET_HDR(p1, hhdr1); GET_HDR(p2, hhdr2); }
# else /* hash */
/* Hash function for tree top level */
# define TL_HASH(hi) ((hi) & (TOP_SZ - 1))
@ -123,6 +257,40 @@ typedef struct bi {
# define SET_HDR(p, hhdr) { register hdr ** _ha; GET_HDR_ADDR(p, _ha); \
*_ha = (hhdr); }
# define HDR(p) GC_find_header((ptr_t)(p))
/* And some interleaved versions for two pointers at once. */
/* This hopefully helps scheduling on processors like IA64. */
# define GET_BI2(p1, bottom_indx1, p2, bottom_indx2) \
{ \
register word hi1 = \
(word)(p1) >> (LOG_BOTTOM_SZ + LOG_HBLKSIZE); \
register word hi2 = \
(word)(p2) >> (LOG_BOTTOM_SZ + LOG_HBLKSIZE); \
register bottom_index * _bi1 = GC_top_index[TL_HASH(hi1)]; \
register bottom_index * _bi2 = GC_top_index[TL_HASH(hi2)]; \
\
while (_bi1 -> key != hi1 && _bi1 != GC_all_nils) \
_bi1 = _bi1 -> hash_link; \
while (_bi2 -> key != hi2 && _bi2 != GC_all_nils) \
_bi2 = _bi2 -> hash_link; \
(bottom_indx1) = _bi1; \
(bottom_indx2) = _bi2; \
}
# define GET_HDR_ADDR2(p1, ha1, p2, ha2) \
{ \
register bottom_index * bi1; \
register bottom_index * bi2; \
\
GET_BI2(p1, bi1, p2, bi2); \
(ha1) = &(HDR_FROM_BI(bi1, p1)); \
(ha2) = &(HDR_FROM_BI(bi2, p2)); \
}
# define GET_HDR2(p1, hhdr1, p2, hhdr2) \
{ register hdr ** _ha1; \
register hdr ** _ha2; \
GET_HDR_ADDR2(p1, _ha1, p2, _ha2); \
(hhdr1) = *_ha1; \
(hhdr2) = *_ha2; \
}
# endif
/* Is the result a forwarding address to someplace closer to the */

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@
* Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
* Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
* Copyright (c) 1996 by Silicon Graphics. All rights reserved.
* Copyright (c) 2000 by Hewlett-Packard Company. All rights reserved.
*
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
* OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
@ -27,6 +28,11 @@
# define LINUX
# endif
/* And one for NetBSD: */
# if defined(__NetBSD__)
# define NETBSD
# endif
/* Determine the machine type: */
# if defined(sun) && defined(mc68000)
# define M68K
@ -50,12 +56,14 @@
# endif
# if defined(__NetBSD__) && defined(m68k)
# define M68K
# define NETBSD
# define mach_type_known
# endif
# if defined(__NetBSD__) && defined(arm32)
# if defined(__NetBSD__) && defined(__powerpc__)
# define POWERPC
# define mach_type_known
# endif
# if defined(__NetBSD__) && defined(__arm32__)
# define ARM32
# define NETBSD
# define mach_type_known
# endif
# if defined(vax)
@ -81,14 +89,17 @@
# endif
# endif
# endif /* !LINUX */
# if defined(__NetBSD__) && defined(__MIPSEL__)
# undef ULTRIX
# endif
# define mach_type_known
# endif
# if defined(sequent) && defined(i386)
# if defined(sequent) && (defined(i386) || defined(__i386__))
# define I386
# define SEQUENT
# define mach_type_known
# endif
# if defined(sun) && defined(i386)
# if defined(sun) && (defined(i386) || defined(__i386__))
# define I386
# define SUNOS5
# define mach_type_known
@ -114,7 +125,7 @@
# define mach_type_known
# endif
# if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) \
&& !defined(__OpenBSD__)
&& !defined(__OpenBSD__) && !(__NetBSD__)
# define SPARC
# define DRSNX
# define mach_type_known
@ -123,6 +134,10 @@
# define RS6000
# define mach_type_known
# endif
# if defined(__NetBSD__) && defined(__sparc__)
# define SPARC
# define mach_type_known
# endif
# if defined(_M_XENIX) && defined(_M_SYSV) && defined(_M_I386)
/* The above test may need refinement */
# define I386
@ -146,6 +161,11 @@
# endif
# define mach_type_known
# endif
# if defined(__BEOS__) && defined(_X86_)
# define I386
# define BEOS
# define mach_type_known
# endif
# if defined(LINUX) && (defined(i386) || defined(__i386__))
# define I386
# define mach_type_known
@ -166,13 +186,17 @@
# define SPARC
# define mach_type_known
# endif
# if defined(LINUX) && defined(arm)
# if defined(LINUX) && defined(__arm__)
# define ARM32
# define mach_type_known
# endif
# if defined(LINUX) && defined(__sh__)
# define SH
# define mach_type_known
# endif
# if defined(__alpha) || defined(__alpha__)
# define ALPHA
# if !defined(LINUX)
# if !defined(LINUX) && !defined(NETBSD)
# define OSF1 /* a.k.a Digital Unix */
# endif
# define mach_type_known
@ -194,37 +218,42 @@
# define MACOS
# define mach_type_known
# endif
# if defined(macosx)
# if defined(macosx) || \
defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
# define MACOSX
# define POWERPC
# define mach_type_known
# endif
# if defined(__APPLE__) && defined(__MACH__) && defined(__i386__)
# define MACOSX
# define I386
--> Not really supported, but at least we recognize it.
# endif
# if defined(NeXT) && defined(mc68000)
# define M68K
# define NEXT
# define mach_type_known
# endif
# if defined(NeXT) && defined(i386)
# if defined(NeXT) && (defined(i386) || defined(__i386__))
# define I386
# define NEXT
# define mach_type_known
# endif
# if defined(__OpenBSD__) && defined(i386)
# if defined(__OpenBSD__) && (defined(i386) || defined(__i386__))
# define I386
# define OPENBSD
# define mach_type_known
# endif
# if defined(__FreeBSD__) && defined(i386)
# if defined(__FreeBSD__) && (defined(i386) || defined(__i386__))
# define I386
# define FREEBSD
# define mach_type_known
# endif
# if defined(__NetBSD__) && defined(i386)
# if defined(__NetBSD__) && (defined(i386) || defined(__i386__))
# define I386
# define NETBSD
# define mach_type_known
# endif
# if defined(bsdi) && defined(i386)
# if defined(bsdi) && (defined(i386) || defined(__i386__))
# define I386
# define BSDI
# define mach_type_known
@ -244,11 +273,26 @@
/* DGUX defined */
# define mach_type_known
# endif
# if (defined(_MSDOS) || defined(_MSC_VER)) && (_M_IX86 >= 300) \
|| defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__)
# define I386
# define MSWIN32 /* or Win32s */
# if defined(_WIN32_WCE)
/* SH3, SH4, MIPS already defined for corresponding architectures */
# if defined(SH3) || defined(SH4)
# define SH
# endif
# if defined(x86)
# define I386
# endif
# if defined(ARM)
# define ARM32
# endif
# define MSWINCE
# define mach_type_known
# else
# if (defined(_MSDOS) || defined(_MSC_VER)) && (_M_IX86 >= 300) \
|| defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__)
# define I386
# define MSWIN32 /* or Win32s */
# define mach_type_known
# endif
# endif
# if defined(__DJGPP__)
# define I386
@ -281,6 +325,11 @@
# define PJ
# define mach_type_known
# endif
# if defined(__embedded__) && defined(PPC)
# define POWERPC
# define NOSYS
# define mach_type_known
# endif
/* Ivan Demakov */
# if defined(__WATCOMC__) && defined(__386__)
# define I386
@ -297,6 +346,10 @@
# endif
# define mach_type_known
# endif
# if defined(__s390__) && defined(LINUX)
# define S370
# define mach_type_known
# endif
/* Feel free to add more clauses here */
@ -325,9 +378,9 @@
/* RS6000 ==> IBM RS/6000 AIX3.X */
/* RT ==> IBM PC/RT */
/* HP_PA ==> HP9000/700 & /800 */
/* HP/UX */
/* SPARC ==> SPARC under SunOS */
/* (SUNOS4, SUNOS5, */
/* HP/UX, LINUX */
/* SPARC ==> SPARC v7/v8/v9 */
/* (SUNOS4, SUNOS5, LINUX, */
/* DRSNX variants) */
/* ALPHA ==> DEC Alpha */
/* (OSF1 and LINUX variants) */
@ -335,9 +388,12 @@
/* (CX_UX and DGUX) */
/* S370 ==> 370-like machine */
/* running Amdahl UTS4 */
/* or a 390 running LINUX */
/* ARM32 ==> Intel StrongARM */
/* IA64 ==> Intel IA64 */
/* (e.g. Itanium) */
/* SH ==> Hitachi SuperH */
/* (LINUX & MSWINCE) */
/*
@ -389,7 +445,9 @@
* Gustavo Rodriguez-Rivera points out that on most (all?) Unix machines,
* the value of environ is a pointer that can serve as STACKBOTTOM.
* I expect that HEURISTIC2 can be replaced by this approach, which
* interferes far less with debugging.
* interferes far less with debugging. However it has the disadvantage
* that it's confused by a putenv call before the collector is initialized.
* This could be dealt with by intercepting putenv ...
*
* If no expression for STACKBOTTOM can be found, and neither of the above
* heuristics are usable, the collector can still be used with all of the above
@ -462,8 +520,12 @@
# define MPROTECT_VDB
# ifdef __ELF__
# define DYNAMIC_LOADING
extern char **__environ;
# define DATASTART ((ptr_t)(&__environ))
# include <features.h>
# if defined(__GLIBC__)&& __GLIBC__>=2
# define LINUX_DATA_START
# else /* !GLIBC2 */
extern char **__environ;
# define DATASTART ((ptr_t)(&__environ))
/* hideous kludge: __environ is the first */
/* word in crt0.o, and delimits the start */
/* of the data segment, no matter which */
@ -472,6 +534,7 @@
/* would include .rodata, which may */
/* contain large read-only data tables */
/* that we'd rather not scan. */
# endif /* !GLIBC2 */
extern int _end;
# define DATAEND (&_end)
# else
@ -567,11 +630,34 @@
# define DATAEND (&_end)
# endif
# ifdef MACOSX
/* There are reasons to suspect this may not be reliable. */
# define ALIGNMENT 4
# define OS_TYPE "MACOSX"
# define DATASTART ((ptr_t) get_etext())
# define STACKBOTTOM ((ptr_t) 0xc0000000)
# define DATAEND /* not needed */
# define MPROTECT_VDB
# include <unistd.h>
# define GETPAGESIZE() getpagesize()
# endif
# ifdef NETBSD
# define ALIGNMENT 4
# define OS_TYPE "NETBSD"
# define HEURISTIC2
extern char etext;
# define DATASTART GC_data_start
# define DYNAMIC_LOADING
# endif
# ifdef NOSYS
# define ALIGNMENT 4
# define OS_TYPE "NOSYS"
extern void __end, __dso_handle;
# define DATASTART (&__dso_handle) /* OK, that's ugly. */
# define DATAEND (&__end)
/* Stack starts at 0xE0000000 for the simulator. */
# undef STACK_GRAN
# define STACK_GRAN 0x10000000
# define HEURISTIC1
# endif
# endif
@ -600,9 +686,12 @@
# ifdef SPARC
# define MACH_TYPE "SPARC"
# define ALIGNMENT 4 /* Required by hardware */
# if defined(__arch64__) || defined(__sparcv9)
# define ALIGNMENT 8
# else
# define ALIGNMENT 4 /* Required by hardware */
# endif
# define ALIGN_DOUBLE
extern int etext;
# ifdef SUNOS5
# define OS_TYPE "SUNOS5"
extern int _etext;
@ -619,10 +708,18 @@
# define HEAP_START DATAEND
# endif
# define PROC_VDB
/* HEURISTIC1 reportedly no longer works under 2.7. Thus we */
/* switched to HEURISTIC2, eventhough it creates some debugging */
/* issues. */
# define HEURISTIC2
/* HEURISTIC1 reportedly no longer works under 2.7. */
/* HEURISTIC2 probably works, but this appears to be preferable. */
/* Apparently USRSTACK is defined to be USERLIMIT, but in some */
/* installations that's undefined. We work around this with a */
/* gross hack: */
# include <sys/vmparam.h>
# ifdef USERLIMIT
/* This should work everywhere, but doesn't. */
# define STACKBOTTOM USRSTACK
# else
# define HEURISTIC2
# endif
# include <unistd.h>
# define GETPAGESIZE() sysconf(_SC_PAGESIZE)
/* getpagesize() appeared to be missing from at least one */
@ -661,21 +758,40 @@
# ifdef LINUX
# define OS_TYPE "LINUX"
# ifdef __ELF__
# define LINUX_DATA_START
# define DYNAMIC_LOADING
# else
Linux Sparc non elf ?
Linux Sparc/a.out not supported
# endif
extern int _end;
extern int _etext;
# define DATAEND (&_end)
# define SVR4
# define STACKBOTTOM ((ptr_t) 0xf0000000)
# ifdef __arch64__
# define STACKBOTTOM ((ptr_t) 0x80000000000ULL)
# define DATASTART (ptr_t)GC_SysVGetDataStart(0x100000, &_etext)
# define CPP_WORDSZ 64
# else
# define STACKBOTTOM ((ptr_t) 0xf0000000)
# define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, &_etext)
# endif
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
# define STACKBOTTOM ((ptr_t) 0xf8000000)
extern int etext;
# define DATASTART ((ptr_t)(&etext))
# endif
# ifdef NETBSD
# define OS_TYPE "NETBSD"
# define HEURISTIC2
# ifdef __ELF__
# define DATASTART GC_data_start
# define DYNAMIC_LOADING
# else
extern char etext;
# define DATASTART ((ptr_t)(&etext))
# endif
# endif
# endif
# ifdef I386
@ -694,12 +810,25 @@
# define DATASTART ((ptr_t)((((word) (&etext)) + 0xfff) & ~0xfff))
# define STACKBOTTOM ((ptr_t) 0x3ffff000)
# endif
# ifdef BEOS
# define OS_TYPE "BEOS"
# include <OS.h>
# define GETPAGESIZE() B_PAGE_SIZE
extern int etext;
# define DATASTART ((ptr_t)((((word) (&etext)) + 0xfff) & ~0xfff))
# endif
# ifdef SUNOS5
# define OS_TYPE "SUNOS5"
extern int etext, _start;
extern char * GC_SysVGetDataStart();
# define DATASTART GC_SysVGetDataStart(0x1000, &etext)
# define STACKBOTTOM ((ptr_t)(&_start))
/* # define STACKBOTTOM ((ptr_t)(&_start)) worked through 2.7, */
/* but reportedly breaks under 2.8. It appears that the stack */
/* base is a property of the executable, so this should not break */
/* old executables. */
/* HEURISTIC2 probably works, but this appears to be preferable. */
# include <sys/vmparam.h>
# define STACKBOTTOM USRSTACK
/** At least in Solaris 2.5, PROC_VDB gives wrong values for dirty bits. */
/*# define PROC_VDB*/
# define DYNAMIC_LOADING
@ -791,7 +920,7 @@
# ifdef USE_3DNOW_PREFETCH
# define PREFETCH(x) \
__asm__ __volatile__ (" prefetch %0": : "m"(*(char *)(x)))
# define PREFETCH_FOR_WRITE(x)
# define PREFETCH_FOR_WRITE(x) \
__asm__ __volatile__ (" prefetchw %0": : "m"(*(char *)(x)))
# endif
# endif
@ -823,6 +952,7 @@
/* os_dep.c. OS2 actually has the right */
/* system call! */
# define DATAEND /* not needed */
# define USE_GENERIC_PUSH_REGS
# endif
# ifdef MSWIN32
# define OS_TYPE "MSWIN32"
@ -833,6 +963,10 @@
# endif
# define DATAEND /* not needed */
# endif
# ifdef MSWINCE
# define OS_TYPE "MSWINCE"
# define DATAEND /* not needed */
# endif
# ifdef DJGPP
# define OS_TYPE "DJGPP"
# include "stubinfo.h"
@ -851,6 +985,7 @@
# ifdef FREEBSD
# define OS_TYPE "FREEBSD"
# define MPROTECT_VDB
# define FREEBSD_STACKBOTTOM
# endif
# ifdef NETBSD
# define OS_TYPE "NETBSD"
@ -861,7 +996,7 @@
# ifdef BSDI
# define OS_TYPE "BSDI"
# endif
# if defined(OPENBSD) || defined(FREEBSD) || defined(NETBSD) \
# if defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
|| defined(THREE86BSD) || defined(BSDI)
# define HEURISTIC2
extern char etext;
@ -960,6 +1095,28 @@
# endif
# define DYNAMIC_LOADING
# endif
# ifdef MSWINCE
# define OS_TYPE "MSWINCE"
# define ALIGNMENT 4
# define DATAEND /* not needed */
# endif
# if defined(NETBSD)
/* This also checked for __MIPSEL__ . Why? NETBSD recognition */
/* should be handled at the top of the file. */
# define ALIGNMENT 4
# define OS_TYPE "NETBSD"
# define HEURISTIC2
# define USE_GENERIC_PUSH_REGS 1
# ifdef __ELF__
extern int etext;
# define DATASTART GC_data_start
# define NEED_FIND_LIMIT
# define DYNAMIC_LOADING
# else
# define DATASTART ((ptr_t) 0x10000000)
# define STACKBOTTOM ((ptr_t) 0x7ffff000)
# endif /* _ELF_ */
# endif
# endif
# ifdef RS6000
@ -973,7 +1130,6 @@
# endif
# ifdef HP_PA
/* OS is assumed to be HP/UX */
# define MACH_TYPE "HP_PA"
# define OS_TYPE "HPUX"
# ifdef __LP64__
@ -984,9 +1140,25 @@
# define ALIGNMENT 4
# define ALIGN_DOUBLE
# endif
extern int __data_start;
# define DATASTART ((ptr_t)(&__data_start))
# if 0
# if !defined(GC_HPUX_THREADS) && !defined(HPUX_THREADS) \
&& !defined(GC_LINUX_THREADS) && !defined(LINUX_THREADS)
# ifndef LINUX /* For now. */
# define MPROTECT_VDB
# endif
# else
# define GENERIC_COMPARE_AND_SWAP
/* No compare-and-swap instruction. Use pthread mutexes */
/* when we absolutely have to. */
# ifdef PARALLEL_MARK
# define USE_MARK_BYTES
/* Minimize compare-and-swap usage. */
# endif
# endif
# define STACK_GROWS_UP
# ifdef HPUX
extern int __data_start;
# define DATASTART ((ptr_t)(&__data_start))
# if 0
/* The following appears to work for 7xx systems running HP/UX */
/* 9.xx Furthermore, it might result in much faster */
/* collections than HEURISTIC2, which may involve scanning */
@ -995,39 +1167,66 @@
/* combinations. (Thanks to Raymond X.T. Nijssen for uncovering */
/* this.) */
# define STACKBOTTOM ((ptr_t) 0x7b033000) /* from /etc/conf/h/param.h */
# else
# else
/* Gustavo Rodriguez-Rivera suggested changing HEURISTIC2 */
/* to this. We'll probably do this on other platforms, too. */
/* For now I'll use it where I can test it. */
/* to this. Note that the GC must be initialized before the */
/* first putenv call. */
extern char ** environ;
# define STACKBOTTOM ((ptr_t)environ)
# endif
# define STACK_GROWS_UP
# define DYNAMIC_LOADING
# ifndef HPUX_THREADS
# define MPROTECT_VDB
# endif
# include <unistd.h>
# define GETPAGESIZE() sysconf(_SC_PAGE_SIZE)
# endif
# endif
# define DYNAMIC_LOADING
# include <unistd.h>
# define GETPAGESIZE() sysconf(_SC_PAGE_SIZE)
# ifndef __GNUC__
# define PREFETCH(x) { \
register long addr = (long)(x); \
(void) _asm ("LDW", 0, 0, addr, 0); \
}
# endif
# endif /* HPUX */
# ifdef LINUX
# define OS_TYPE "LINUX"
# define LINUX_STACKBOTTOM
# define DYNAMIC_LOADING
# define LINUX_DATA_START
extern int _end;
# define DATAEND (&_end)
# endif /* LINUX */
# endif /* HP_PA */
# ifdef ALPHA
# define MACH_TYPE "ALPHA"
# define ALIGNMENT 8
# define USE_GENERIC_PUSH_REGS
/* Gcc and probably the DEC/Compaq compiler spill pointers to preserved */
/* fp registers in some cases when the target is a 21264. The assembly */
/* code doesn't handle that yet, and version dependencies make that a */
/* bit tricky. Do the easy thing for now. */
/* Gcc and probably the DEC/Compaq compiler spill pointers to preserved */
/* fp registers in some cases when the target is a 21264. The assembly */
/* code doesn't handle that yet, and version dependencies make that a */
/* bit tricky. Do the easy thing for now. */
# ifdef NETBSD
# define OS_TYPE "NETBSD"
# define HEURISTIC2
# define DATASTART GC_data_start
# define ELFCLASS32 32
# define ELFCLASS64 64
# define ELF_CLASS ELFCLASS64
# define CPP_WORDSZ 64
# define DYNAMIC_LOADING
# endif
# ifdef OSF1
# define OS_TYPE "OSF1"
# define DATASTART ((ptr_t) 0x140000000)
extern _end;
extern int _end;
# define DATAEND ((ptr_t) &_end)
# define HEURISTIC2
extern char ** environ;
/* round up from the value of environ to the nearest page boundary */
/* Probably breaks if putenv is called before collector */
/* initialization. */
# define STACKBOTTOM ((ptr_t)(((word)(environ) | (getpagesize()-1))+1))
/* # define HEURISTIC2 */
/* Normally HEURISTIC2 is too conervative, since */
/* the text segment immediately follows the stack. */
/* Hence we give an upper pound. */
/* This is currently unused, since we disabled HEURISTIC2 */
extern int __start;
# define HEURISTIC2_LIMIT ((ptr_t)((word)(&__start) & ~(getpagesize()-1)))
# define CPP_WORDSZ 64
@ -1039,9 +1238,9 @@
# define CPP_WORDSZ 64
# define STACKBOTTOM ((ptr_t) 0x120000000)
# ifdef __ELF__
# define LINUX_DATA_START
# define SEARCH_FOR_DATA_START
# define DATASTART GC_data_start
# define DYNAMIC_LOADING
/* This doesn't work if the collector is in a dynamic library. */
# else
# define DATASTART ((ptr_t) 0x140000000)
# endif
@ -1059,39 +1258,46 @@
/* Requires 16 byte alignment for malloc */
# define ALIGNMENT 8
# define USE_GENERIC_PUSH_REGS
/* We need to get preserved registers in addition to register windows. */
/* That's easiest to do with setjmp. */
/* We need to get preserved registers in addition to register */
/* windows. That's easiest to do with setjmp. */
# ifdef PARALLEL_MARK
# define USE_MARK_BYTES
/* Compare-and-exchange is too expensive to use for */
/* setting mark bits. */
# endif
# ifdef HPUX
--> needs work
# endif
# ifdef LINUX
# define OS_TYPE "LINUX"
# define CPP_WORDSZ 64
/* This should really be done through /proc, but that */
/* requires we run on an IA64 kernel. */
# define STACKBOTTOM ((ptr_t) 0xa000000000000000l)
/* The following works on NUE and older kernels: */
/* # define STACKBOTTOM ((ptr_t) 0xa000000000000000l) */
/* This does not work on NUE: */
# define LINUX_STACKBOTTOM
/* We also need the base address of the register stack */
/* backing store. There is probably a better way to */
/* get that, too ... */
# define BACKING_STORE_BASE ((ptr_t) 0x9fffffff80000000l)
# if 1
# define SEARCH_FOR_DATA_START
# define DATASTART GC_data_start
# else
extern int data_start;
# define DATASTART ((ptr_t)(&data_start))
# endif
/* backing store. This is computed in */
/* GC_linux_register_stack_base based on the following */
/* constants: */
# define BACKING_STORE_ALIGNMENT 0x100000
# define BACKING_STORE_DISPLACEMENT 0x80000000
extern char * GC_register_stackbottom;
# define BACKING_STORE_BASE ((ptr_t)GC_register_stackbottom)
# define SEARCH_FOR_DATA_START
# define DATASTART GC_data_start
# define DYNAMIC_LOADING
# define MPROTECT_VDB
/* Requires Linux 2.3.47 or later. */
extern int _end;
# define DATAEND (&_end)
# define PREFETCH(x) \
__asm__ (" lfetch [%0]": : "r"((void *)(x)))
# define PREFETCH_FOR_WRITE(x) \
__asm__ (" lfetch.excl [%0]": : "r"((void *)(x)))
# define CLEAR_DOUBLE(x) \
__asm__ (" stf.spill [%0]=f0": : "r"((void *)(x)))
# ifdef __GNUC__
# define PREFETCH(x) \
__asm__ (" lfetch [%0]": : "r"((void *)(x)))
# define PREFETCH_FOR_WRITE(x) \
__asm__ (" lfetch.excl [%0]": : "r"((void *)(x)))
# define CLEAR_DOUBLE(x) \
__asm__ (" stf.spill [%0]=f0": : "r"((void *)(x)))
# endif
# endif
# endif
@ -1114,15 +1320,25 @@
# ifdef S370
# define MACH_TYPE "S370"
# define OS_TYPE "UTS4"
# define ALIGNMENT 4 /* Required by hardware */
extern int etext;
# define USE_GENERIC_PUSH_REGS
# ifdef UTS4
# define OS_TYPE "UTS4"
extern int etext;
extern int _etext;
extern int _end;
extern char * GC_SysVGetDataStart();
# define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, &_etext)
# define DATAEND (&_end)
# define HEURISTIC2
# endif
# ifdef LINUX
# define OS_TYPE "LINUX"
# define HEURISTIC1
# define DYNAMIC_LOADING
extern int __data_start;
# define DATASTART ((ptr_t)(&__data_start))
# endif
# endif
# if defined(PJ)
@ -1173,8 +1389,37 @@
# define DATASTART ((ptr_t)((((word) (&etext)) + 0xfff) & ~0xfff))
# endif
# endif
# ifdef MSWINCE
# define OS_TYPE "MSWINCE"
# define DATAEND /* not needed */
# endif
#endif
# ifdef SH
# define MACH_TYPE "SH"
# define ALIGNMENT 4
# ifdef MSWINCE
# define OS_TYPE "MSWINCE"
# define DATAEND /* not needed */
# endif
# ifdef LINUX
# define OS_TYPE "LINUX"
# define STACKBOTTOM ((ptr_t) 0x7c000000)
# define USE_GENERIC_PUSH_REGS
# define DYNAMIC_LOADING
# define LINUX_DATA_START
extern int _end;
# define DATAEND (&_end)
# endif
# endif
# ifdef SH4
# define MACH_TYPE "SH4"
# define OS_TYPE "MSWINCE"
# define ALIGNMENT 4
# define DATAEND /* not needed */
# endif
#ifdef LINUX_DATA_START
/* Some Linux distributions arrange to define __data_start. Some */
/* define data_start as a weak symbol. The latter is technically */
@ -1188,6 +1433,14 @@
# define DATASTART ((ptr_t)(&__data_start != 0? &__data_start : &data_start))
#endif
#if defined(LINUX) && defined(REDIRECT_MALLOC)
/* Rld appears to allocate some memory with its own allocator, and */
/* some through malloc, which might be redirected. To make this */
/* work with collectable memory, we have to scan memory allocated */
/* by rld's internal malloc. */
# define USE_PROC_FOR_LIBRARIES
#endif
# ifndef STACK_GROWS_UP
# define STACK_GROWS_DOWN
# endif
@ -1234,6 +1487,12 @@
# define SUNOS5SIGS
# endif
# if defined(SVR4) || defined(LINUX) || defined(IRIX) || defined(HPUX) \
|| defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
|| defined(BSD) || defined(AIX) || defined(MACOSX) || defined(OSF1)
# define UNIX_LIKE /* Basic Unix-like system calls work. */
# endif
# if CPP_WORDSZ != 32 && CPP_WORDSZ != 64
-> bad word size
# endif
@ -1264,6 +1523,10 @@
# undef MPROTECT_VDB /* Can't deal with address space holes. */
# endif
# ifdef PARALLEL_MARK
# undef MPROTECT_VDB /* For now. */
# endif
# if !defined(PCR_VDB) && !defined(PROC_VDB) && !defined(MPROTECT_VDB)
# define DEFAULT_VDB
# endif
@ -1288,15 +1551,38 @@
((word*)x)[1] = 0;
# endif /* CLEAR_DOUBLE */
/* Internally to the collector we test only the XXX_THREADS macros */
/* not the GC_XXX_THREADS versions. Here we make sure the latter */
/* are treated as equivalent. */
#if defined(GC_SOLARIS_THREADS) && !defined(_SOLARIS_THREADS)
# define _SOLARIS_THREADS
#endif
#if defined(GC_SOLARIS_THREADS) && !defined(_SOLARIS_PTHREADS)
# define _SOLARIS_PTHREADS
#endif
#if defined(GC_IRIX_THREADS) && !defined(IRIX_THREADS)
# define IRIX_THREADS
#endif
#if defined(GC_LINUX_THREADS) && !defined(LINUX_THREADS)
# define LINUX_THREADS
#endif
#if defined(GC_WIN32_THREADS) && !defined(WIN32_THREADS)
# define WIN32_THREADS
#endif
#if defined(GC_HPUX_THREADS) && !defined(HPUX_THREADS)
# define HPUX_THREADS
#endif
#if defined(GC_OSF1_THREADS) && !defined(OSF1_THREADS)
# define OSF1_THREADS
#endif
/* Internally we use SOLARIS_THREADS to test for either old or pthreads. */
# if defined(_SOLARIS_PTHREADS) && !defined(SOLARIS_THREADS)
# define SOLARIS_THREADS
# endif
# if defined(IRIX_THREADS) && !defined(IRIX5)
--> inconsistent configuration
# endif
# if defined(IRIX_JDK_THREADS) && !defined(IRIX5)
--> inconsistent configuration
# endif
# if defined(LINUX_THREADS) && !defined(LINUX)
--> inconsistent configuration
# endif
@ -1309,16 +1595,26 @@
# if defined(PCR) || defined(SRC_M3) || \
defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || \
defined(IRIX_THREADS) || defined(LINUX_THREADS) || \
defined(IRIX_JDK_THREADS) || defined(HPUX_THREADS)
defined(HPUX_THREADS) || defined(OSF1_THREADS)
# define THREADS
# endif
# if defined(HP_PA) || defined(M88K) || defined(POWERPC) \
|| (defined(I386) && defined(OS2)) || defined(UTS4) || defined(LINT)
/* Use setjmp based hack to mark from callee-save registers. */
# if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(MACOSX) \
|| defined(LINT) || defined(MSWINCE) \
|| (defined(I386) && defined(__LCC__))
/* Use setjmp based hack to mark from callee-save registers. */
/* The define should move to the individual platform */
/* descriptions. */
# define USE_GENERIC_PUSH_REGS
# endif
# if defined(SPARC) && !defined(LINUX)
# if defined(I386) && defined(LINUX)
/* SAVE_CALL_CHAIN is supported if the code is compiled to save */
/* frame pointers by default, i.e. no -fomit-frame-pointer flag. */
# ifdef SAVE_CALL_COUNT
# define SAVE_CALL_CHAIN
# endif
# endif
# if defined(SPARC)
# define SAVE_CALL_CHAIN
# define ASM_CLEAR_CODE /* Stack clearing is crucial, and we */
/* include assembly code to do it well. */