1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-27 13:30:31 +02:00
Commit graph

21772 commits

Author SHA1 Message Date
Andy Wingo
7885ea1037 nofl: Prevent needless expansion
Releasing memory proceeds until there is (-NOFL_BLOCK_SIZE,0] bytes to
release; we should only expand when the number of bytes to reacquire is
large enough.
2025-01-21 21:12:45 +01:00
Andy Wingo
2a51399896 nofl: Disable some consistency checks when tracing conservatively 2025-01-21 21:09:03 +01:00
Yuval Langer
0b501477f9 Fix faulty SRFI-31 example. 2025-01-20 10:52:49 +01:00
Daniel Llorens
bf3c632b82 Fix bug in srfi-111 box printer
* module/srfi/srfi-111.scm: Add missing port.
* test-suite/tests/srfi-111.test: Test.
2025-01-16 15:47:03 +01:00
Andy Wingo
f93777c133 generational-pcc: Make a smaller pending-ephemeron nursery table
Otherwise we end up visiting a pending-ephemeron set that is
proportional in size to the whole heap.
2025-01-15 22:32:31 +01:00
Andy Wingo
685c63ab3a Trim remembered-set during minor GC
When visiting remembered-set roots, if the target is no longer in
newspace, forget the edge.
2025-01-15 22:31:48 +01:00
Mikael Djurfeldt
8ac25f3fae README: Add dependency on autopoint 2025-01-13 22:51:35 +01:00
Andy Wingo
cc68a9a610 Update docs 2025-01-13 21:42:18 +01:00
Andy Wingo
f9c2ce04d4 Add generational-pcc to embed.mk 2025-01-13 21:08:13 +01:00
Andy Wingo
ba65e32b00 pcc / copy-space: Allow allocations to fail
This fixes an issue in which minor collection of a nursery full of live
data can fail because of fragmentation, whereas really it should just
fall back to promotion.
2025-01-13 17:22:43 +01:00
Andy Wingo
5fdb14cc5e Remove "ABORTED" atomic forwarding state
It was not distinguishable from "NOT_FORWARDED".
2025-01-13 16:44:12 +01:00
Andy Wingo
b23b77218c nofl space: Fix a bug for parallel optimistic evacuation
If two tracer threads visit edges to the same object on an evacuation
candidate block, and they first see that the object is unmarked, then
they both try to evacuate it at the same time.  Thread A might try and
fail before thread B manages to acquire the forwarding word.  B needs to
see that A marked it in place, and to do that it needs to re-load the
mark byte after acquiring the forwarding word.  Otherwise perhaps B
could succeed and you would end up with two copies of an object, one of
them garbled!
2025-01-13 16:28:40 +01:00
Andy Wingo
e41000094d Add missing write barriers to finalizers.c 2025-01-13 10:23:47 +01:00
Andy Wingo
b37a7f3862 copy-space: Fix bug computing field logging byte location
Also re-enable survivors in generational-pcc :)
2025-01-13 09:12:34 +01:00
Andy Wingo
27f9a1f01e gpcc: Temporarily always promote survivors
Generational PCC is still a bit buggy.
2025-01-10 16:40:19 +01:00
Andy Wingo
4ab72e92b0 gpcc: Don't mix survivors and new objects in same block 2025-01-10 16:40:19 +01:00
Andy Wingo
c95b7ef046 New collector configuration: generational-pcc 2025-01-10 16:40:19 +01:00
Andy Wingo
65b74b5abb Add generational support to pcc 2025-01-10 16:40:14 +01:00
Andy Wingo
0b8630145a Copy space clears log bits when obtaining fresh blocks 2025-01-10 16:05:34 +01:00
Andy Wingo
555694965d Looking up large object for edge returns the object 2025-01-10 16:05:34 +01:00
Andy Wingo
e4048b5296 Add offset to field-logging fast path 2025-01-10 16:05:34 +01:00
Andy Wingo
209be38640 Pushing logged edges takes ownership of edge buffers
This allows field logging to proceed during collection, which might add
new edge buffers.  Also fix a bug that would cause debug-mode assertion
failures, where clearing a field set didn't clear edge buffer next
pointers.
2025-01-10 16:03:53 +01:00
Andy Wingo
8b96d8cf90 Fix embarassing use of uninitialized variable 2025-01-10 16:03:53 +01:00
Andy Wingo
47aa6f041f Add ALWAYS_INLINE to gc_field_set_visit_edge_buffer 2025-01-10 16:03:53 +01:00
Andy Wingo
e65c81518d Fix copy space compilation in debug mode
Also add copy_space_should_promote
2025-01-10 16:02:37 +01:00
Andy Wingo
0318770266 pcc: abstract space that has blocks paged out and in 2025-01-06 16:59:54 +01:00
Andy Wingo
c7645975bf pcc: abstract space into which small objects are allocated
This may be the nursery, in future.
2025-01-06 16:59:54 +01:00
Andy Wingo
095d2ff953 Copy space maintains block flag indicating which are survivors 2025-01-06 16:59:54 +01:00
Andy Wingo
336c2dfadd Beginnings of scaffolding for generational pcc 2025-01-06 16:59:54 +01:00
Andy Wingo
4f8c7bef61 Refactor copy_space_forward to take src and dst spaces 2025-01-06 16:59:54 +01:00
Andy Wingo
274cf43864 Add new old-gen predicate method: check a range of addresses 2025-01-06 16:59:54 +01:00
Andy Wingo
d96b53facd Missing inline decl: gc_old_generation_check_alloc_table_bit_pattern 2025-01-06 16:59:54 +01:00
Andy Wingo
b33efb2759 Copy space can reserve some blocks for field-logging bits
Useful for an oldgen
2025-01-06 16:59:54 +01:00
Andy Wingo
a74a2c129c Copy space has flags, can indicate that space is aligned
This will be useful for copy-space nurseries.
2025-01-06 16:59:54 +01:00
Andy Wingo
d2e745ac23 Rework large object space
Store allocations in a splay tree so that we can efficiently map from an
edge originating in the lospace to its object.  Defer returning memory
to the OS to a periodic background thread, using a similar strategy as
for nofl and copy-space pages.  Use a size-segregated freelist instead
of requiring a full best-fit search for those pages that haven't yet
been returned to the OS.
2025-01-06 16:59:54 +01:00
Andy Wingo
8e631ca3f3 Remove embedder requirement for per-object remset bits
Since we now have a field-logging write barrier, we don't need
per-object log bits.
2025-01-06 16:59:54 +01:00
Andy Wingo
4be3e69ac1 Add asserts to address map / address set 2025-01-06 16:59:54 +01:00
Andy Wingo
95868c70a2 Add splay tree 2025-01-06 16:59:54 +01:00
Andy Wingo
2dcdfc24bc Field set: per-edge clear callback is optional 2025-01-06 16:59:54 +01:00
Andy Wingo
6a6f5b09e3 Use PROT_NONE to reserve memory, then remap within that memory
Should play better with the kernel's overcommit heuristics.
2025-01-06 16:59:54 +01:00
Andy Wingo
922c13a183 Move mmap / munmap / madvise to gc-platform 2025-01-06 16:59:54 +01:00
Tomas Volf
f6359a4715
doc: srfi-19: Use day' instead of date' for `make-date'.
Looking at the SRFI-19 specification, the argument is called `day', not
`date'.  Even the accessor is called `date-day'.  So adjust the
documentation to match.

Also adjust the (web http) module, which was using `date' as well.

* doc/ref/srfi-modules.texi (SRFI-19 Date): Use `day' instead of `date'.
* module/web/http.scm (parse-rfc-822-date, parse-rfc-850-date)
(parse-asctime-date): Same.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-22 22:46:11 +01:00
Maxim Cournoyer
98ffeacf2c
doc: Document SRFI-64.
This is an import of the 'Abstract', 'Rationale', and 'Specification'
sections from the upstream specification text, with some manual
adjustment.

* doc/ref/srfi-modules.texi (SRFI 64): New subsection.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-22 22:46:11 +01:00
Ekaitz Zarraga
c9d0a0c48c
doc: Add explanation on how to avoid escaping in SXML
* doc/ref/sxml.texi (Reading and Writing XML): Add explanation on using
  a procedure to avoid escaping.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-22 22:46:11 +01:00
Ekaitz Zarraga
d987e7e7cb
doc: Fix typo in SXML section.
* doc/ref/sxml.texi (Reading and Writing XML): Remove "."

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-22 22:45:59 +01:00
Ekaitz Zarraga
6750f6cc80
PEG: string-peg: Add HTML5 grammar test.
* test-suite/tests/peg.test (comment-grammar): Z can be anything.
("simple comment with forbidden char"): Remove.
(html-grammar, html-example): New variables.
("parsing with complex grammars"): New test.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-22 22:17:39 +01:00
Ekaitz Zarraga
38ad264979
PEG: string-peg: Better support for escaping.
* module/ice-9/peg/string-peg.scm (peg-as-peg): Augment with rules for
hexadecimal digits, “\uXXX” for characters, “\t” for tabs, etc.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-22 22:14:12 +01:00
Ekaitz Zarraga
c86a48a92f
PEG: string-peg: Fix [^...] interpretation.
* module/ice-9/peg/string-peg.scm (NotInClass->defn): Adjust.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-22 22:14:04 +01:00
Adam Faiz
c2829e4a86 New line or field iteration procedures in (ice-9 rdelim)
* NEWS: Update
* module/ice-9/rdelim (for-rdelim-from-port, for-delimited-from-port,
  for-line-in-file): New procedures.
* doc/ref/api-io.texi: Documentation of `for-rdelim-for-port`-related
  procedures.
* test-suite/tests/rdelim.test: Tests for `for-rdelim-for-port`-related
  procedures.

Signed-off-by: Mikael Djurfeldt <mikael@djurfeldt.com>
2024-12-19 22:36:38 +01:00
Mikael Djurfeldt
a9c079b13b goops.test: Add tests for define-method* 2024-12-11 22:43:17 +01:00