Files
janet/test
Calvin Rose 2d9b2ca995 Implement fixes for #1930 with copy-on-write system
This lets buffers be flagged as copy-on-write for certain cases where
most of the time, we will not modify a buffer. If we do modify a buffer
we replace a call to realloc with a call to malloc + memcpy, and let
the old memory live until the next garbage collection.

One caveeat is that this does require though that all functions that
mutate buffers call `janet_buffer_cow_check()` before mutating a buffers
internal memory.

This is similar to the JANET_BUFFER_FLAG_NO_REALLOC but instead of
panicing will usually do what the user wants. Notably, the precence or
absence of the flag will not affect observable behavior, so an error
path that does not restore old flags will not break later uses of that
buffer.
2026-10-25 19:19:34 -05:00
..
2026-10-10 13:21:42 -05:00
2026-10-05 21:46:28 -05:00