⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.solaris2

📁 linux下建立JAVA虚拟机的源码KAFFE
💻 SOLARIS2
字号:
The collector supports both incremental collection and threads underSolaris 2.  The incremental collector normally retrieves page dirty informationthrough the appropriate /proc calls.  But it can also be configured(by defining MPROTECT_VDB instead of PROC_VDB in gcconfig.h) to use mprotectand signals.  This may result in shorter pause times, but it is no longersafe to issue arbitrary system calls that write to the heap.Under other UNIX versions,the collector normally obtains memory through sbrk.  There is some reasonto expect that this is not safe if the client program also calls the systemmalloc, or especially realloc.  The sbrk man page strongly suggests this isnot safe: "Many library routines use malloc() internally, so use brk()and sbrk() only when you know  that malloc() definitely will not be used byany library routine."  This doesn't make a lot of sense to me, since thereseems to be no documentation as to which routines can transitively call malloc.Nonetheless, under Solaris2, the collector now (since 4.12) allocatesmemory using mmap by default.  (It defines USE_MMAP in gcconfig.h.)You may want to reverse this decisions if you use -DREDIRECT_MALLOC=...SOLARIS THREADS:The collector must be compiled with -DGC_SOLARIS_THREADS (thr_ functions)or -DGC_SOLARIS_PTHREADS (pthread_ functions) to be thread safe.It is also essential that gc.h be included in files that call thr_create,thr_join, thr_suspend, thr_continue, or dlopen.  Gc.h macro definesthese to also do GC bookkeeping, etc.  Gc.h must be included withone or both of these macros defined, otherwisethese replacements are not visible.A collector built in this way way only be used by programs that arelinked with the threads library.In this mode, the collector contains various workarounds for older Solarisbugs.  Mostly, these should not be noticeable unless you look at systemcall traces.  However, it cannot protect a guard page at the end ofa thread stack.  If you know that you will only be running Solaris2.5or later, it should be possible to fix this by compiling the collectorwith -DSOLARIS23_MPROTECT_BUG_FIXED.Since 5.0 alpha5, dlopen disables collection temporarily,unless USE_PROC_FOR_LIBRARIES is defined.  In some unlikely cases, thiscan result in unpleasant heap growth.  But it seems better than therace/deadlock issues we had before.If solaris_threads are used on an X86 processor with malloc redirected toGC_malloc a deadlock is likely to result.It appears that there is a problem in using gc_cpp.h in conjunction withSolaris threads and Sun's C++ runtime.  Apparently the overloaded new operatoris invoked by some iostream initialization code before threads are correctlyinitialized.  As a result, call to thr_self() in garbage collectorinitialization  segfaults.  Currently the only known workaround is to notinvoke the garbage collector from a user defined global operator new, or tohave it invoke the garbage-collector's allocators only after main has started.(Note that the latter requires a moderately expensive test in operatordelete.)Hans-J. Boehm(The above contains my personal opinions, which are probably not sharedby anyone else.)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -