Merge remote-tracking branch 'offical/master'

This commit is contained in:
ed
2025-03-06 05:27:42 -05:00
158 changed files with 12536 additions and 4057 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ a multipointer can be indexed, but does not have a definite length. A slice is
a pointer that points to multiple objects equipped with the length, specifying
the amount of objects a slice points to.
When object's values are read through a pointer, that operation is called a
*load* operation. When memory is read through a pointer, that operation is
When an object's values are read through a pointer, that operation is called a
*load* operation. When memory is written to through a pointer, that operation is
called a *store* operation. Both of these operations can be called a *memory
access operation*.
+2
View File
@@ -341,7 +341,9 @@ arena_allocator_proc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode,
new_end := start + size
if start < old_end && old_end == block.used && new_end <= block.reserved {
// grow data in-place, adjusting next allocation
prev_used := block.used
_ = alloc_from_memory_block(block, new_end - old_end, 1, default_commit_size=arena.default_commit_size) or_return
arena.total_used += block.used - prev_used
data = block.base[start:new_end]
return
}