summaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* Rename doc folder to docsIvan Maidanski2023-01-2633-5027/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * CMakeLists.txt [enable_docs] (CMAKE_INSTALL_DOCDIR): Rename doc folder to docs. * Makefile.am [ENABLE_DOCS] (docdocdir, dist_docdocs_DATA, dist_docdocsplatforms_DATA): Likewise. * Makefile.direct (CXXFLAGS): Likewise. * README.md: Likewise. * docs/simple_example.md (Other platforms): Likewise. * Makefile.am [ENABLE_DOCS] (docdocdir): Rename to docdocsdir. * Makefile.am [ENABLE_DOCS] (dist_docdoc_DATA): Rename to dist_docdocs_DATA. * Makefile.am [ENABLE_DOCS] (docdocplatformsdir): Rename to docdocsplatformsdir. * Makefile.am [ENABLE_DOCS] (dist_docdocplatforms_DATA): Rename to dist_docdocsplatforms_DATA. * doc/README.autoconf: Move to docs folder. * doc/README.cmake: Likewise. * doc/README.cords: Likewise. * doc/README.environment: Likewise. * doc/README.macros: Likewise. * doc/debugging.md: Likewise. * doc/faq.md: Likewise. * doc/finalization.md: Likewise. * doc/gcdescr.md: Likewise. * doc/gcinterface.md: Likewise. * doc/leak.md: Likewise. * doc/overview.md: Likewise. * doc/porting.md: Likewise. * doc/scale.md: Likewise. * doc/simple_example.md: Likewise. * doc/tree.md: Likewise. * doc/platforms/README.aix: Move to docs/platforms folder. * doc/platforms/README.amiga: Likewise. * doc/platforms/README.arm_cross: Likewise. * doc/platforms/README.darwin: Likewise. * doc/platforms/README.dgux386: Likewise. * doc/platforms/README.emscripten: Likewise. * doc/platforms/README.ews4800: Likewise. * doc/platforms/README.hp: Likewise. * doc/platforms/README.linux: Likewise. * doc/platforms/README.mac: Likewise. * doc/platforms/README.os2: Likewise. * doc/platforms/README.sgi: Likewise. * doc/platforms/README.solaris2: Likewise. * doc/platforms/README.symbian: Likewise. * doc/platforms/README.uts: Likewise. * doc/platforms/README.win32: Likewise. * doc/platforms/README.win64: Likewise.
* Make links to mentioned platforms/README files in doc .md filesIvan Maidanski2023-01-261-1/+1
| | | | | * doc/debugging.md (Bus Errors and Segmentation Violations): Convert "README.win32" to a link.
* Convert faq.html to Markdown formatIvan Maidanski2023-01-253-133/+107
| | | | | | | | * Makefile.am [ENABLE_DOCS] (dist_doc_DATA): Replace faq.html with faq.md. * doc/overview.md: Likewise. * doc/faq.html: Change file suffix to .md; convert text file from HTML to Markdown.
* Update acm.org links to https ones in documentationIvan Maidanski2023-01-254-9/+9
| | | | | | | * doc/faq.html: Replace http links to acm.org with https ones. * doc/gcdescr.md (Black-listing): Likewise. * doc/gcinterface.md (C/C++ Interface): Likewise. * doc/overview.md (Further reading): Likewise.
* Update FAQ document to the current BDWGC versionIvan Maidanski2023-01-251-25/+18
| | | | | | | | | | | * doc/faq.html: Use double quotes instead of a pair of single ones; fix a typo ("Proceedings"); give a hint to ensure the GC library is compiled with THREAD_LOCAL_ALLOC instead of advising gc_local_alloc.h usage; remove a hint for single-threaded apps (because the performance gain by using a single-threaded GC library should be negligible compared to the default multi-threaded one for single-threaded apps); point to overview.md file; point to README.md (for the information how to find answers to other potential questions).
* Put faq.html to codebaseHans Boehm2023-01-252-2/+140
| | | | | | | | | * Makefile.am [ENABLE_DOCS] (dist_doc_DATA): Add doc/faq.html entry. * doc/faq.html: New file. * doc/overview.md: Change links to faq.html to point to the file in doc folder (not website). Co-authored-by: Ivan Maidanski <ivmai@mail.ru>
* Fix typos in comments and documentation (regarding 'it is')Ivan Maidanski2023-01-171-1/+1
| | | | | | | | | | | | * ChangeLog (4.3): Fix typo ("it's"). * doc/platforms/README.amiga (GC_AMIGA_GC): Likewise. * extra/AmigaOS.c (GC_amiga_allocwrapper_any): Fix typo in comment ("it's"). * malloc.c (GC_free): Likewise. * new_hblk.c (GC_build_fl): Likewise. * os_dep.c [DATASTART_USES_BSDGETDATASTART] (GC_FreeBSDGetDataStart): Likewise. * reclaim.c (GC_start_reclaim): Likewise.
* Better separate libgc build- and use-time macro descriptions in READMERoger Pack2022-12-211-48/+60
| | | | | | | | | | | | | | | | | | | | | PR #521 (bdwgc). Express the difference between macros which are tested in the bdwgc public headers (i.e. during build of the client source) and macros tested in the bdwgc .c files and private headers. * doc/README.macros: Devide the table with macro descriptions into two ones. * doc/README.macros (GC_DEBUG, GC_NO_THREAD_DECLS, GC_DLL, GC_NOT_DLL, GC_NO_INLINE_STD_NEW, GC_MARKERS, GC_NO_VALLOC, GC_REQUIRE_WCSDUP): Mention all files the macro is tested in. * doc/README.macros (GC_NO_THREAD_REDIRECTS): Mention that not only thread creation routines are redirected. * doc/README.macros (_ENABLE_ARRAYNEW, GC_DLL): Refine description. * doc/README.macros (GC_NO_OPERATOR_NEW_ARRAY, GC_NO_VALLOC, GC_REQUIRE_WCSDUP): Move to the first table. Co-authored-by: Ivan Maidanski <ivmai@mail.ru>
* Add Linux example to README.cmakeRoger Pack2022-12-211-4/+15
| | | | | | | | | | | PR #520 (bdwgc). Add a sample of how to install libgc via cmake. * doc/README.cmake (BUILD PROCESS): Refine the instruction; add a sample for Linux. Co-authored-by: Ivan Maidanski <ivmai@mail.ru>
* Mention all doc files in overview documentRoger Pack2022-12-112-15/+33
| | | | | | | | | | | | | | | | | | | | | | Issue #517 (bdwgc). Use overview.md as the "default" for all the doc files. * README.md (The C++ Interface to the Allocator): Replace "gcinterface.md" to "here" in link title (to match other links to .md files). * doc/overview.md: Add "Documentation files" section. * doc/overview.md (Further reading): Remove link to gc/faq.html (as it is also given in other section). * doc/overview.md (Information provided on the BDWGC site): Move links to all *.md files to "Documentation files" section. * doc/overview.md (Documentation files): New section; add links to README.autoconf, README.cmake, README.environment, README.macros, finalization.md, porting.md, README.cords. * doc/simple_example.md (Running the executable): Point to README.environment by a link. Co-authored-by: Ivan Maidanski <ivmai@mail.ru>
* Avoid uncertainty with the complete licensing terms in overview.mdIvan Maidanski2022-12-111-4/+3
| | | | | | | (fix of commit 5db4637cb) * doc/overview.md (A garbage collector for C and C++): Point only to LICENSE file for the complete licensing terms.
* Change file extension of README.* to lower case in doc/platformsIvan Maidanski2022-12-075-1/+1
| | | | | | | | | | | | | * Makefile.am [ENABLE_DOCS] (dist_doc_DATA): Rename README.DGUX386 to README.dgux386. * doc/README.macros (GC_DGUX386_THREADS): Likewise. * Makefile.am [ENABLE_DOCS] (dist_doc_DATA): Rename README.Mac to README.mac; rename README.OS2 to README.os2; rename README.arm.cross to README.arm_cross; reorder items. * doc/platforms/README.arm.cross: Rename to README.arm_cross. * doc/platforms/README.DGUX386: Rename to README.dgux386. * doc/platforms/README.Mac: Rename to README.mac. * doc/platforms/README.OS2: Rename to README.os2.
* Move platform-specific README files to doc/platformsRoger Pack2022-12-0719-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #515 (bdwgc). Make doc folder less overwhelming by moving platform specific docs to their own folder. * Makefile.am (dist_doc_DATA): Change doc/README.* to doc/platforms/README.* for README.DGUX386, README.Mac, README.OS2, README.aix, README.amiga, README.arm.cross, README.darwin, README.emscripten, README.ews4800, README.hp, README.linux, README.sgi, README.solaris2, README.symbian, README.uts, README.win32, README.win64. * README.md (General Description, Installation and Portability): Update links to README.win32, README.win64 and README.* files. * doc/debugging.md (Bus Errors and Segmentation Violations): Put README.win32 in quotes (to match that in other .md files). * doc/README.DGUX386: Move to doc/platforms folder. * doc/README.Mac: Likewise. * doc/README.OS2: Likewise. * doc/README.aix: Likewise. * doc/README.amiga: Likewise. * doc/README.arm.cross: Likewise. * doc/README.darwin: Likewise. * doc/README.emscripten: Likewise. * doc/README.ews4800: Likewise. * doc/README.hp: Likewise. * doc/README.linux: Likewise. * doc/README.sgi: Likewise. * doc/README.solaris2: Likewise. * doc/README.symbian: Likewise. * doc/README.uts: Likewise. * doc/README.win32: Likewise. * doc/README.win64: Likewise. * doc/simple_example.md (Other platforms): Replace doc/README.xxx to doc/platforms folder.
* Enable HBLKSIZE values up to 64KIvan Maidanski2022-11-251-1/+1
| | | | | | | | | | | | | | | | This is to support configurations with 64 KB page size. * doc/README.macros (HBLKSIZE): Change maximum value from 16384 to 65536. * include/private/gc_priv.h [!HBLKSIZE && (LARGE_CONFIG || !SMALL_CONFIG) && !ALPHA && SN_TARGET_PSP2] (CPP_LOG_HBLKSIZE): Do not define. * include/private/gc_priv.h [HBLKSIZE && HBLKSIZE==32768] (CPP_LOG_HBLKSIZE): Set to 15. * include/private/gc_priv.h [HBLKSIZE && HBLKSIZE==65536] (CPP_LOG_HBLKSIZE): Set to 16. * include/private/gcconfig.h [ARM32 && SN_TARGET_PSP2 && !HBLKSIZE] (HBLKSIZE): Set to 65536.
* Make Emscripten Asyncify feature optionalJukka Jylanki2022-11-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #506 (bdwgc). "-sASYNCIFY" is a relatively rarely used feature of Emscripten, most developers do not use it, and it does not scale well to moderate-to-large codebases. It incurs a heavy impact to code size and performance, and carries other correctness problems that developers must then adhere to regarding event loop message ordering. This commit provides new option in cmake (-Denable_emscripten_asyncify) and configure (--enable-emscripten-asyncify) scripts to turn on Emscripten Asyncify feature on demand. * CMakeLists.txt (enable_emscripten_asyncify): New option (off by default). * CMakeLists.txt (EMSCRIPTEN): Define using check_c_source_compiles. * CMakeLists.txt [EMSCRIPTEN && enable_emscripten_asyncify] (EMSCRIPTEN_ASYNCIFY): Define C macro. * CMakeLists.txt [EMSCRIPTEN && enable_emscripten_asyncify] (CMAKE_EXE_LINKER_FLAGS): Append "-sASYNCIFY" and "-sASYNCIFY_STACK_SIZE=128000". * configure.ac (emscripten): Remove quotes for the error directive message. * configure.ac [emscripten] (gc_cflags): Move comment and assignment down (to be after reporting result for emscripten). * configure.ac (emscripten-asyncify): New AC_ARG_ENABLE option; add comment. * configure.ac [enable_emscripten_asyncify && emscripten] (gc_cflags): Add -D EMSCRIPTEN_ASYNCIFY; remove space after "-s". * configure.ac [emscripten] (gc_cflags): Append "-sASYNCIFY" and "-sASYNCIFY_STACK_SIZE=128000" only if enable_emscripten_asyncify. * doc/README.macros (EMSCRIPTEN_ASYNCIFY): Document. * os_dep.c [!ECOS && !NOSYS && !SYMBIAN && EMSCRIPTEN]: Make USE_EMSCRIPTEN_SCAN_STACK has effect only if EMSCRIPTEN_ASYNCIFY. * os_dep.c [THREADS && EMSCRIPTEN]: Include emscripten.h only if EMSCRIPTEN_ASYNCIFY. * os_dep.c [THREADS && EMSCRIPTEN] (scan_regs_cb, GC_default_push_other_roots): Define as a function only if EMSCRIPTEN_ASYNCIFY; update comment. Co-authored-by: Ivan Maidanski <ivmai@mail.ru>
* Refine gcinterface.md that the allocator belongs to SGI STLIvan Maidanski2022-11-211-1/+1
| | | | | * doc/gcinterface.md (C interface): Outline that "malloc_alloc" name belongs to STL (not libgc).
* Fix gccpp and gctba library names in gcinterface.mdIvan Maidanski2022-11-211-3/+3
| | | | | | * doc/gcinterface.md (Class inheritance, C interface): Change "libgccpp" and "libgctba" to "gccpp" and "gctba", respectively (i.e., remove "lib" prefix).
* Mention gctba library in README.cmakeIvan Maidanski2022-11-211-1/+1
| | | | | | | | (fix of commit 3efd0bc4e) * doc/README.cmake (BUILD PROCESS): Mention gctba along with gccpp (i.e. -Denable_cplusplus=ON option forces cmake to build also gctba library by default).
* Fix cmake usage instructions in README to build and run testsIvan Maidanski2022-11-211-1/+1
| | | | | | | | | | (fix of commit 4dfd06514) Issue #501 (bdwgc). * README.md (Installation and Portability): Pass -Dbuild_tests=ON to cmake. * doc/README.cmake (BUILD PROCESS): Likewise.
* Redirect reallocarray() in leak_detector.hIvan Maidanski2022-11-021-3/+3
| | | | | | | | | Issue #491 (bdwgc). * doc/leak.md: Mention reallocarray function; reorder redirected functions list. * include/gc/leak_detector.h (reallocarray): Redefine to GC_REALLOC(). * tests/leak.c (main): Call reallocarray() in a loop.
* Fix mistyped function name in documentation of REDIRECT_REALLOCIvan Maidanski2022-11-021-1/+1
| | | | | * doc/README.macros (REDIRECT_REALLOC): Fix typo ("realloc" w/o GC_ prefix).
* Define public GC_[p]valloc() and redirect to them in leak_detector.hIvan Maidanski2022-10-282-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #495 (bdwgc). * doc/README.macros (GC_NO_VALLOC): Document. * doc/leak.md: Mention GNU valloc and pvalloc functions. * include/gc/gc.h (GC_memalign): Remove comment that it is not tested; add comment describing the functionality and a note. * include/gc/gc.h [!GC_NO_VALLOC] (GC_valloc, GC_pvalloc): Declare new API function. * include/gc/leak_detector.h [!GC_NO_VALLOC] (valloc, pvalloc): Redefine to the corresponding GC_ function. * include/private/gc_priv.h (GC_page_size): Add comment. * include/private/gc_priv.h (GC_real_page_size): Declare new variable (or as a macro). * include/private/gcconfig.h [NACL] (GETPAGESIZE): Add TODO item. * mallocx.c (GC_memalign): Likewise. * tests/gctest.c (run_one_test): Likewise. * include/private/gcconfig.h [CYGWIN32 && (MPROTECT_VDB || USE_MUNMAP) || !MSWIN32 && !MSWINCE && !CYGWIN32 && (GC_DISABLE_INCREMENTAL || DEFAULT_VDB) && !USE_MMAP] (ALT_PAGESIZE_USED): Define macro. * include/private/gcconfig.h [CYGWIN32 && (MPROTECT_VDB || USE_MUNMAP) || !MSWIN32 && !MSWINCE && !CYGWIN32 && (GC_DISABLE_INCREMENTAL || DEFAULT_VDB) && !USE_MMAP && !GC_NO_VALLOC] (REAL_PAGESIZE_NEEDED): Likewise. * mallocx.c (GC_strdup): Reformat comment. * mallocx.c [!GC_NO_VALLOC] (GC_valloc, GC_pvalloc): Implement. * os_dep.c [REAL_PAGESIZE_NEEDED] (GC_real_page_size): Define variable. * os_dep.c [MSWIN32 || MSWINCE || CYGWIN32] (GC_setpagesize): Replace CYGWIN32&&(MPROTECT_VDB||USE_MUNMAP) to ALT_PAGESIZE_USED; remove comment that a separate variable could be added; reformat comment; assert about GC_pagesize only if REAL_PAGESIZE_NEEDED. * os_dep.c [ALT_PAGESIZE_USED && REAL_PAGESIZE_NEEDED] (GC_setpagesize): Set GC_real_page_size. * os_dep.c [!MSWIN32 && !MSWINCE && !CYGWIN32] (GC_setpagesize): Replace MPROTECT_VDB||PROC_VDB||SOFT_VDB||USE_MMAP to !ALT_PAGESIZE_USED. * tests/gctest.c [!GC_NO_VALLOC] (run_one_test): Call GC_valloc() and GC_pvalloc().
* Adjust naming of Win32/64 and x86/64 words in comments and documentationIvan Maidanski2022-09-268-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog: Replace i386 and X86 to x86; replace x86_64 and amd64 to x64; replace "Win32 pthreads" to pthreads-win32; lower case win32s, x86, x64; replace win32 to Win32; replace "MS Windows" to Windows (in documentation and comments). * NT_MAKEFILE: Likewise. * README.md: Likewise. * configure.ac: Likewise. * cord/tests/de_win.c: Likewise. * doc/README.macros: Likewise. * doc/README.solaris2: Likewise. * doc/README.win32: Likewise. * doc/README.win64: Likewise. * doc/debugging.md: Likewise. * doc/leak.md: Likewise. * doc/overview.md: Likewise. * doc/porting.md: Likewise. * extra/msvc_dbg.c: Likewise. * finalize.c: Likewise. * include/gc/cord.h: Likewise. * include/gc/gc.h: Likewise. * include/private/gc_priv.h: Likewise. * include/private/gcconfig.h: Likewise. * include/private/pthread_stop_world.h: Likewise. * mach_dep.c: Likewise. * mark.c: Likewise. * mark_rts.c: Likewise. * misc.c: Likewise. * os_dep.c: Likewise. * tools/threadlibs.c: Likewise. * win32_threads.c: Likewise. * cord/tests/de.c (WIN32): Remove misleading comment. * misc.c (GC_enable_incremental): Change comment about win32s to TODO item.
* Fix hb_obj_kind type in documentation (ASCII diagram) describing hblkhdrIvan Maidanski2022-08-031-1/+3
| | | | | * doc/tree.md (A picture): Change type of hb_obj_kind (of hblkhdr) from ushort to uchar; add hb_flags field right after hb_obj_kind.
* Fix SUNOS5SIGS documentation to match macro definition in gcconfig.hIvan Maidanski2022-07-051-2/+1
| | | | | * doc/README.macros (SUNOS5SIGS): Update documentation (mention FreeBSD to match that in gcconfig.h).
* Prevent (fix) parallel custom mark procs run in single-threaded clientsIvan Maidanski2022-06-012-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the collector is built with parallel marker support then marking is performed in parallel on multi-core targets. Thus, if the client provides custom mark procedures, then they could be executed in parallel. In case of a single-threaded client (developed for the older libgc version with the parallel mark support off), its custom mark procedures might not be prepared to be launched in parallel. Now, the parallel mark threads are not launched, even if available, until the client starts a (user) thread (e.g. calls pthread_create or GC_allow_register_threads) or tells the collector explicitly to start the mark threads (by calling GC_start_mark_threads). * doc/README.macros (GC_ALWAYS_MULTITHREADED): Update documentation. * doc/scale.md (Options for enhanced scalability): Likewise. * include/gc/gc.h [GC_THREADS] (GC_parallel, GC_allow_register_threads): Update comment. * include/gc/gc.h (GC_set_markers_count, GC_start_mark_threads): Likewise. * include/gc/gc_mark.h (GC_mark_proc): Likewise. * include/gc/gc_mark.h (GC_PROC_BYTES, GC_ms_entry): Move upper to be before the comment belonging to GC_mark_proc. * misc.c [THREADS && PARALLEL_MARK] (GC_init): Do not call GC_start_mark_threads_inner(). * misc.c [PARALLEL_MARK] (GC_start_mark_threads): Call GC_start_mark_threads_inner() even if THREAD_SANITIZER or no CAN_HANDLE_FORK. * misc.c [THREADS] (GC_get_parallel): Remove comment. * pthread_support.c [PARALLEL_MARK && !CAN_HANDLE_FORK] (available_markers_m1): Define as a variable. * win32_threads.c [PARALLEL_MARK && !CAN_HANDLE_FORK] (available_markers_m1): Likewise. * pthread_support.c [PARALLEL_MARK && !CAN_HANDLE_FORK] (GC_wait_for_gc_completion): Declare. * pthread_support.c [PARALLEL_MARK && !CAN_HANDLE_FORK] (GC_start_mark_threads_inner): If GC_parallel then return; call GC_wait_for_gc_completion(); set GC_markers_m1 value from available_markers_m1. * win32_threads.c [PARALLEL_MARK && (!GC_PTHREADS_PARAMARK || !CAN_HANDLE_FORK)] (GC_start_mark_threads_inner): Likewise. * pthread_support.c [CAN_HANDLE_FORK && PARALLEL_MARK && THREAD_SANITIZER] (fork_child_proc): Set available_markers_m1 to 0. * pthread_support.c [CAN_HANDLE_FORK]: Move GC_remove_all_threads_but_me() call to be after setting available_markers_m1. * pthread_support.c (GC_allow_register_threads): Call GC_start_mark_threads(). * tests/middle.c (main): Likewise. * win32_threads.c (GC_allow_register_threads): Likewise. * pthread_support.c [PARALLEL_MARK] (pthread_create): Call GC_start_mark_threads() unless GC_parallel or available_markers_m1<=0. * win32_threads.c (START_MARK_THREADS): Define macro (to call GC_start_mark_threads() if PARALLEL_MARK). * win32_threads.c (GC_CreateThread): Call START_MARK_THREADS() (right before set_need_to_lock). * win32_threads.c [!CYGWIN32 && !MSWINCE && !MSWIN_XBOX1 && !NO_CRT] (GC_beginthreadex): Likewise. * win32_threads.c [GC_PTHREADS] (GC_pthread_create): Likewise.
* Change default GC_time_limit value from 50 to 15 msIvan Maidanski2022-05-061-1/+1
| | | | | | | | | | * alloc.c [(!GC_TIME_LIMIT || CPPCHECK) && !PARALLEL_MARK] (GC_time_limit): Change value from 50 to 15. * pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL && GC_ENABLE_SUSPEND_THREAD && (!GC_TIME_LIMIT || CPPCHECK)] (GC_brief_async_signal_safe_sleep): Likewise. * doc/gcdescr.md (Generational Collection and Dirty Bits): Change the default value of predetermined amount of time from 50 ms to 15 ms.
* Rename MAP_LEN internal macro to OBJ_MAP_LENIvan Maidanski2022-03-051-1/+1
| | | | | | | | | | | | | (refactoring) * doc/tree.md (A picture): Rename MAP_LEN to OBJ_MAP_LEN. * obj_map.c [MARK_BIT_PER_GRANULE] (GC_add_map_entry): Likewise. * include/private/gc_priv.h (hblkhdr.hb_marks): Reformat comment (to have quoted phrase on a line). * include/private/gc_priv.h [MARK_BIT_PER_GRANULE] (MAP_LEN): Rename to OBJ_MAP_LEN. * obj_map.c [MARK_BIT_PER_GRANULE] (GC_add_map_entry): Replace BYTES_TO_GRANULES(HBLKSIZE) to OBJ_MAP_LEN.
* Allow to unmap memory block right in GC cycle where block is freedIvan Maidanski2022-02-272-7/+8
| | | | | | | | | | | | | | | | | | | | | This commit changes how GC_unmap_threshold is interpreted: GC_unmap_threshold==N now means block is returned to OS if the block is freed N-1 collections ago (previously was: N collections ago). * allchblk.c [USE_MUNMAP && !MUNMAP_THRESHOLD] (MUNMAP_THRESHOLD): Change value from 6 to 7. * configure.ac [$enable_munmap!=no && ($MUNMAP_THRESHOLD="" || $MUNMAP_THRESHOLD=yes)] (MUNMAP_THRESHOLD): Likewise. * allchblk.c [USE_MUNMAP] (GC_unmap_old): Go on with unmapping also if GC_gc_no==hb_last_reclaimed+GC_unmap_threshold; update comment. * configure.ac (munmap): Update help string (including change of the default value from 6 to 7). * configure.ac [$enable_munmap!=no] (MUNMAP_THRESHOLD): Likewise. * doc/README.environment (GC_UNMAP_THRESHOLD): Update documentation. * doc/README.macros (MUNMAP_THRESHOLD): Likewise. * include/private/gcconfig.h [USE_MUNMAP && !MUNMAP_THRESHOLD && (SN_TARGET_PS3 || SN_TARGET_PSP2 || MSWIN_XBOX1)] (MUNMAP_THRESHOLD): Change value from 2 to 3.
* Name all tests consistentlyIvan Maidanski2022-02-073-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (refactoring) In brief, the tests naming as follows: all test executable files end with "test" (not "_test"); all test source files do not have "test" suffix (except for gctest); test.c is named now as gctest.c. * CMakeLists.txt: Rename leak_test.c to leak.c; rename huge_test.c to huge.c; rename leak_test.c to leak.c; rename realloc_test.c to realloc.c; rename smash_test.c to smash.c; rename staticrootslib.c to staticroots_lib.c; rename trace_test.c to trace.c; rename thread_leak_test.c to threadleak.c; rename threadkey_test to threadkey_test; rename threadkey_test.c to threadkey.c; rename subthreadcreate_test to subthreadcreatetest; rename subthread_create.c to subthreadcreate.c; rename initsecondarythread_test to initfromthreadtest; rename initsecondarythread.c to initfromthread.c; rename disclaim_test to disclaimtest; rename disclaim_test.c to disclaim.c; rename disclaim_weakmap_test to weakmaptest; rename disclaim_weakmap_test.c to weakmap.c. * tests/tests.am: Likewise. * CMakeLists.txt: Rename test.c to gctest.c; rename test_cpp to cpptest; rename test_cpp.cc to cpp.cc. * Makefile.direct: Likewise. * NT_MAKEFILE: Likewise. * README.md (Installation and Portability): Likewise. * WCC_MAKEFILE: Likewise. * digimars.mak: Likewise. * doc/README.Mac: Likewise. * tests/tests.am: Likewise. * CMakeLists.txt: rename test_atomic_ops.c to atomicops.c; rename test_atomic_ops to atomicopstest. * configure.ac [$with_libatomic_ops=check]: Likewise. * ChangeLog (8.3.0): Rename threadkey_test to threadkeytest; rename test_atomic_ops to atomicopstest; rename test_cpp to cpptest. * Makefile.direct: Rename test.o to gctest.o. * NT_MAKEFILE: Rename test_cpp.exe to cpptest.exe; rename test.obj to gctest.obj. * WCC_MAKEFILE: Likewise. * digimars.mak: Likewise. * doc/README.win64: Likewise. * configure.ac: Rename test_cpp to cpptest in comment. * doc/leak.md: Rename leak_test.c to leak.c. * tests/test_atomic_ops.c: Rename to atomicops.c; remove test name in "skipped" message. * tests/test_cpp.cc: Rename to cpp.cc; rename test_cpp to cpptest. * tests/disclaim_test.c: Rename to disclaim.c. * tests/test.c: Rename to gctest.c. * tests/huge_test.c: Rename to huge.c. * tests/initsecondarythread.c: Rename to initfromthread.c. * tests/leak_test.c: Rename to leak.c. * tests/realloc_test.c: Rename to realloc.c. * tests/smash_test.c: Rename to smash.c. * tests/staticrootstest.c: Rename to staticroots.c. * tests/staticrootslib.c: Rename to staticroots_lib.c. * tests/subthread_create.c: Rename to subthreadcreate.c; remove test name in printed messages. * tests/threadkey_test.c: Rename to threadkey.c; remove test name in "skipped" message. * tests/thread_leak_test.c: Rename to threadleak.c. * tests/trace_test.c: Rename to trace.c. * tests/disclaim_weakmap_test.c: Rename to weakmap.c; rename disclaim_test.c to disclaim.c in comment.
* Remove ancient PCR-MakefileIvan Maidanski2021-11-291-1/+2
| | | | | | | | | | | | * Makefile.am (EXTRA_DIST): Remove PCR-Makefile item; reorder items. * Makefile.direct (srcdir): Update comment. * Makefile.direct (pcr): Remove rule. * PCR-Makefile: Remove. * README.md (Installation and Portability): Do not mention PCR has a specific makefile. * doc/README.macros (PCR): Mention PCR-specific defines from PCR-Makefile. * tests/test.c (NTHREADS): Do not mention PCR.
* Do not list all .c files in ancient README.MacIvan Maidanski2021-11-291-20/+1
| | | | | * doc/README.Mac (Files to build the GC libraries): Replace all .c files of the base folder with extra/gc.c one.
* Remove ancient SMakefile.amigaIvan Maidanski2021-11-291-7/+13
| | | | | | | | | | * Makefile.am (EXTRA_DIST): Remove SMakefile.amiga item. * README.md (Installation and Portability): Do not mention Amiga has a specific makefile. * SMakefile.amiga: Remove. * doc/README.amiga: Mention Makefile.direct instead of Makefile. * doc/README.amiga (WHATS NEW): Copy Amiga-specific options and defines from SMakefile.amiga file.
* Remove ancient OS2_MAKEFILEIvan Maidanski2021-11-291-2/+9
| | | | | | | | | | WCC_MAKEFILE could be used instead (for OS/2 target). * Makefile.am (EXTRA_DIST): Remove OS2_MAKEFILE item. * OS2_MAKEFILE: Remove. * WCC_MAKEFILE: Change "OS2" to "OS/2" in the title comment. * doc/README.OS2: Refer to WCC_MAKEFILE instead of OS2_MAKEFILE; copy notes from OS2_MAKEFILE.
* Remove Symbian makefileIvan Maidanski2021-11-291-1/+55
| | | | | | | | | | | * build/s60v3/bld.inf: Remove. * build/s60v3/libgc.mmp: Likewise. * doc/README.symbian: Copy content of bld.inf and libgc.mmp (as a sample build configuration); add global_end.cpp, global_start.cpp, init_global_static_roots.cpp as source files. * Makefile.am (EXTRA_DIST): Remove bld.inf, libgc.mmp items. * README.md (Installation and Portability): Do not mention Symbian-specific makefile.
* Remove doc.am and move gc.man to base folderIvan Maidanski2021-11-252-208/+0
| | | | | | | | | | | | | | | (refactoring) This is to eliminate non-dist-doc files in doc folder. * CMakeLists.txt [enable_docs] (doc/gc.man): Rename to gc.man. * Makefile.am [ENABLE_DOCS] (dist_man3_MANS): Likewise. * Makefile.direct (BSD-pkg-install): Likewise. * Makefile.am: Do not include doc/doc.am. * Makefile.am [ENABLE_DOCS] (dist_doc_DATA, dist_man3_MANS): Copy assignment from doc.am. * doc/doc.am: Remove. * doc/gc.man: Rename to gc.man.
* Adjust link to file with the license in overview.mdIvan Maidanski2021-11-251-1/+1
| | | | | | | (fix of commit 2fd7564a0) * doc/overview.md: Refer to LICENSE file (for licensing terms) instead of README.md file.
* Update README.win32 about default build configuration (configure, cmake)Ivan Maidanski2021-11-251-5/+5
| | | | | | * doc/README.win32: Update information about the build with GNU make (the collector is built as shared library by default); mention that CMake builds the collector with threads support by default.
* Fix a typo in debugging.mdIvan Maidanski2021-11-251-1/+1
| | | | | * doc/debugging.md (Unexpectedly Large Heap): Fix typo "primitives in", add missing space after it.
* Quote all mentioned header files in README.md and debugging.mdIvan Maidanski2021-11-251-2/+2
| | | | | | | * README.md (The C Interface to the Allocator, The C++ Interface to the Allocator): Wrap all (remaining) mentioned .h files in apostrophes. * doc/debugging.md (Unexpectedly Large Heap): Likewise.
* Move public header files to include/gc in source treeIvan Maidanski2021-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, include/extra public header files (for the redirection) are moved to include directory. This is have the same directories structure of public headers in the source tree as that of the installed "include" directory. * doc/finalization.md: Remove "include/" prefix for cord.h. * LICENSE: Rename include/gc_allocator.h to gc/gc_allocator.h. * Makefile.direct (CORD_SRCS, CORD_INCLUDE_FILES): Add "gc/" prefix for cord.h, ec.h, cord_pos.h. * CMakeLists.txt [install_headers]: Likewise. * cord/cord.am (pkginclude_HEADERS): Likewise. * Makefile.direct (SRCS, tests/test.o, dyn_load.o, dyn_load_sunos53.o, mark.o, typd_mlc.o, finalize.o, ptr_chck.o, specific.o, alloc.o, pthread_support.o, thread_local_alloc.o, win32_threads.o): Add "gc/" prefix for gc_typed.h, gc_tiny_fl.h, gc_version.h, gc_inline.h, gc_mark.h, gc_disclaim.h, gc_allocator.h, javaxfc.h, gc_backptr.h, gc_gcj.h, leak_detector.h, gc_pthread_redirects.h, gc_config_macros.h. * NT_MAKEFILE (test.obj): Add gc\ prefix for gc_mark.h, gc_disclaim.h. * NT_MAKEFILE (cord\tests\de.obj, cord\tests\de_win.obj): Add gc\ prefix for cord.h, cord_pos.h. * OS2_MAKEFILE (cord\cordbscs.obj, cord\cordxtra.obj, cord\cordprnt.obj, cordtest.exe): Likewise. * cord/cordbscs.c: Add "gc/" prefix in include for cord.h, ec.h; reorder includes. * cord/cordprnt.c: Likewise. * cord/cordxtra.c: Likewise. * cord/tests/cordtest.c: Likewise. * cord/tests/de.c: Likewise. * cord/tests/de_win.c: Likewise. * extra/gc.c: Add "gc/" prefix in include for gc_inline.h, gc_pthread_redirects.h, javaxfc.h, gc_disclaim.h, gc_gcj.h, gc_backptr.h, gc_mark.h, gc_tiny_fl.h, leak_detector.h., gc_typed.h. * finalize.c: Likewise. * fnlz_mlc.c: Likewise. * gcj_mlc.c: Likewise. * include/private/dbg_mlc.h: Likewise. * include/private/gc_pmark.h: Likewise. * include/private/gc_priv.h: Likewise. * include/private/thread_local_alloc.h: Likewise. * malloc.c: Likewise. * mallocx.c: Likewise. * pthread_stop_world.c: Likewise. * pthread_support.c: Likewise. * reclaim.c: Likewise. * tests/disclaim_bench.c: Likewise. * tests/disclaim_test.c: Likewise. * tests/disclaim_weakmap_test.c: Likewise. * tests/leak_test.c: Likewise. * tests/staticrootstest.c: Likewise. * tests/test.c: Likewise. * tests/thread_leak_test.c: Likewise. * tests/trace_test.c: Likewise. * thread_local_alloc.c: Likewise. * typd_mlc.c: Likewise. * tests/test_cpp.cc: Add "gc/" prefix in include for gc_allocator.h. * include/extra/gc.h: Move to include folder; replace include<> to include "". * include/extra/gc_cpp.h: Likewise. * include/cord.h: Move to include/gc folder. * include/cord_pos.h: Likewise. * include/ec.h: Likewise. * include/gc.h: Likewise. * include/gc_allocator.h: Likewise. * include/gc_backptr.h: Likewise. * include/gc_config_macros.h: Likewise. * include/gc_cpp.h: Likewise. * include/gc_disclaim.h: Likewise. * include/gc_gcj.h: Likewise. * include/gc_inline.h: Likewise. * include/gc_mark.h: Likewise. * include/gc_pthread_redirects.h: Likewise. * include/gc_tiny_fl.h: Likewise. * include/gc_typed.h: Likewise. * include/gc_version.h: Likewise. * include/javaxfc.h: Likewise. * include/leak_detector.h: Likewise. * include/include.am (pkginclude_HEADERS): Add "gc/" prefix for gc.h, gc_backptr.h, gc_config_macros.h, gc_inline.h, gc_mark.h, gc_tiny_fl.h, gc_typed.h, gc_version.h, javaxfc.h, leak_detector.h, gc_disclaim.h, gc_gcj.h, gc_pthread_redirects.h, gc_allocator.h, gc_cpp.h. * CMakeLists.txt [install_headers]: Likewise. * include/include.am (include_HEADERS): Remove "extra/" prefix for gc_cpp.h, gc.h. * CMakeLists.txt [install_headers]: Likewise.
* Move non-license info from LICENSE file to READMEIvan Maidanski2021-11-241-1/+6
| | | | | | | | | | | | | | | | | | * LICENSE: Remove INSTALLATION, TYPICAL USE, WARNINGS sections (i.e., remove all non-license information). * README.md (Overview): Add link to README.cords; some other minor changes; reformat text. * README.md (General Description): Add link to README.win32 and README.win64; reformat text. * README.md (Installation and Portability): Mention CMake before providing exact build commands; add reference to README.cmake and README.macros; mention how to build the collector on Windows; mention that threads are on be default; mention how to build cord library with Makefile.direct mention that Symbian has a separate makefile. * README.md (The C++ Interface to the Allocator): Copy information about building the C++ GC libraries from LICENSE; add link to gcinterface.md. * doc/README.cords: Copy information about cord library building from LICENSE file.
* Exclude licensing terms from README.cords in favor of LICENSEIvan Maidanski2021-11-231-10/+0
| | | | | | | | The licensing terms in README.cords are the same as in LICENSE file. The other documentation files do not contain any licensing information. * doc/README.cords: Remove licensing information (from the beginning of the file).
* Rename README.QUICK to LICENSE and install it by defaultIvan Maidanski2021-11-232-1/+2
| | | | | | | | | | | | | | README.QUICK contains the package copyright and licensing terms, it is more natural to name the file as LICENSE. * CMakeLists.txt [enable_docs] (install): Add LICENSE for $CMAKE_INSTALL_DOCDIR; remove note that README.QUICK is not installed. * README.QUICK: Rename to LICENSE. * Makefile.am (EXTRA_DIST): Do not add README.QUICK. * README.md (Copyright & Warranty, Contributors): Rename README.QUICK to LICENSE. * doc/README.DGUX386: Refer to README.md instead of README.QUICK. * doc/doc.am [ENABLE_DOCS] (dist_doc_DATA): Add LICENSE.
* Add 'lib' prefix to build artifact names in Makefile.directIvan Maidanski2021-11-141-1/+1
| | | | | | | | | | | | | | | This is to match libraries naming convention of CMake and configure scripts. * Makefile.direct: Update comment (add "lib" prefix to gc.a, gccpp.a, gctba.a, cord.a). * Makefile.direct (bsd-libgc.a, bsd-libgccpp.a, bsd-libgctba.a, bsd-libleak.a, base_lib, gc.a, cords, libcord.a, test_cpp, gctba.a, cord.a, c++, gccpp.a, gctba.a, cordtest, de, gctest): Add "lib" prefix to gc.a, gccpp.a, gctba.a, cord.a. * README.QUICK (INSTALLATION, TYPICAL USE): Likewise. * README.md (Installation and Portability): Likewise. * doc/gcinterface.md (C/C++ Interface): Likewise.
* Refer to Makefile.direct instead of deleted Makefile file in READMEIvan Maidanski2021-11-032-3/+3
| | | | | | | | | | | (fix of commit 183c30bb0) * Makefile.am (EXTRA_DIST): Remove outdated comment exclusion of "Makefile" file. * README.QUICK (WARNINGS): Mention "Makefile.am or Makefile.direct" instead of "Makefile". * doc/README.linux: Mention "Makefile.direct" instead of "Makefile". * doc/README.sgi: Likewise.
* Do not name GCC intrinsics as C11 onesIvan Maidanski2021-10-301-2/+2
| | | | | | | | | | * CMakeLists.txt (GC_BUILTIN_ATOMIC): Do not mention C11 in comment (or documentation) when referring to GCC intrinsics. * configure.ac (GC_BUILTIN_ATOMIC): Likewise. * include/private/gc_atomic_ops.h: Likewise. * ChangeLog (8.0.0): Do not mention C11 when referring to GCC intrinsics. * doc/README.macros (GC_BUILTIN_ATOMIC): Likewise.
* Add a link to known uses of bdwgc to READMEIvan Maidanski2021-10-181-2/+1
| | | | | | * README.md (Overview): Add a link to Known-clients page on GitHub. * doc/overview.md (Information provided on the BDWGC site): Remove comment that the list on the Known-clients page is outdated.
* Adjust dist_doc_DATA after renaming README.aixIvan Maidanski2021-10-151-1/+1
| | | | | | | (fix of commit 561484bfc) * doc/doc.am (dist_doc_DATA): Move README.aix to have items ordered lexicographically.
* Rename README.rs6000 to README.aixIvan Maidanski2021-10-132-1/+1
| | | | | | | RS6000 system was renamed to AIX/ppc long ago. * doc/README.rs6000: Rename to doc/README.aix. * doc/doc.am (dist_doc_DATA): Rename README.rs6000 to README.aix.