Barinzaya
583a397e1d
Fixed alignment handling in mem.Dynamic_Arena.
2026-06-24 00:58:45 -04:00
gingerBill
1b75c44508
Change mem.Dynamic_Arena's alignment to be minimum_alignment
2026-06-23 12:18:15 +01:00
gingerBill
e30da0beb3
Remove old dynamic_pool_ aliases
2026-06-23 12:10:26 +01:00
gingerBill
3b56706439
Merge pull request #6471 from Carlyle-Foster/master
...
rename DEFAULT_PAGE_SIZE to PAGE_SIZE
2026-06-23 12:08:37 +01:00
gco
77af26b5c8
fix buffer overflow when running a test which shrinks a dynamic array that was not the last allocation
2026-06-07 11:23:05 +10:00
jakubtomsu
450e6917b2
use context.assertion_failure_proc in tracking allocator bad free callback
2026-05-06 20:57:19 +02:00
gingerBill
813e2bd807
Merge pull request #6558 from sudokit/master
...
`address_hint` onto virtual memory reserve proc
2026-04-16 13:37:47 +01:00
c4veman
9d0a27af7a
Fix virtual.map_file usage example
2026-04-16 10:56:02 +01:00
Lukas Arens
55c592955d
removed default arguments from virtual_{platform}.odin files
2026-04-13 19:28:17 +03:00
Lukas Arens
f2635bbb13
added adress_hint to virtual memory reserve function on all platforms
2026-04-12 18:51:56 +03:00
alektron
98d6b3bc85
Undo change from #6398 and fix arena overcommit bug in the correct place;
2026-04-10 23:53:41 +02:00
jakubtomsu
e7c29e21ee
remove Fixed_Byte_Buffer
2026-03-26 19:40:14 +01:00
jakubtomsu
382ca331be
runtime align_forward procs as source of truth
2026-03-26 19:38:49 +01:00
Mortimer Snerd
2363f85944
Fix for corner case in the scratch allocator.
...
The scratch allocator could erroneously return a slice
overlapping previously allocated memory for allocation
requests that were smaller than the arena size, but larger
than the amount of free space left in the arena.
- fix the check in mem::scratch_alloc_bytes_non_zeroed
that wasn't routing the request to the backup allocator.
- added concrete reproduction test under tests/issues.
2026-03-25 19:33:17 -04:00
Carlyle
df7af333d4
fixed default page size on posix
2026-03-24 22:33:19 -07:00
Carlyle
b169c048fe
made PAGE_SIZE more consistent
2026-03-24 17:58:11 -07:00
Carlyle
7ffbe52995
renamed DEFAULT_PAGE_SIZE to PAGE_SIZE
2026-03-24 16:35:03 -07:00
Jeroen van Rijn
2d77303b27
Revert "added get_page_size() to core:mem/virtual"
2026-03-24 16:16:24 +01:00
Carlyle
d6a47f5e99
added get_page_size() to core:mem/virtual
2026-03-23 11:43:13 -07:00
imp0s5ible
e2bb7d70af
Make map_file_from_path use the open flags
...
map_file_from_path now passes the appropriate flags on to os.open
instead of always calling it with os.O_RDWR.
It will no longer try to open a file with write permissions if the user
didn't request write access to the file mapping (or vice-versa).
2026-03-20 15:21:12 +01:00
Shane Shrybman
5d80809dc8
Fix virtual arena memory block overcommit bug #5821
2026-03-10 11:13:15 -04:00
Jeroen van Rijn
e7dbabf668
core:os -> core:os/old && core:os/os2 -> core:os
2026-02-09 15:50:21 +01:00
Jeroen van Rijn
8ed264680b
Remove all core:os imports from JS targets
...
Fix `local_tz_name` on FreeBSD.
2026-02-09 15:07:27 +01:00
Jeroen van Rijn
af8bc8bbfc
More conflicts during rebase
2026-02-08 12:51:24 +01:00
Jeroen van Rijn
c2647673ec
mem.virtual -> os2
2026-02-08 12:44:15 +01:00
gingerBill
e5153a937b
Merge pull request #5859 from odin-lang/bill/change-license
...
Change Odin's LICENSE to zlib from BSD 3-clause
2025-11-04 13:53:13 +00:00
Daniel Troszczyński
5df053f765
Typo in description of mem.ptr_sub.
2025-10-30 21:04:28 +01:00
gingerBill
4bdce9bf0a
Correct license for tlsf
2025-10-29 16:00:29 +00:00
gingerBill
842cfee0f3
Change Odin's LICENSE to zlib from BSD 3-clause
...
This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
2025-10-28 14:38:25 +00:00
gingerBill
a20c09158a
Fix indentation
2025-10-27 18:51:51 +00:00
gingerBill
4068eeb5fa
Add Raw_String16/Raw_Cstring16 to core:mem
2025-10-10 09:57:53 +01:00
Jeroen van Rijn
7a9ea3ee6d
Further overhaul of package line comments.
2025-10-09 23:05:29 +02:00
Jeroen van Rijn
8a35acd506
More package lines.
2025-10-09 20:11:06 +02:00
gingerBill
af189b45f3
Fix typo
2025-10-09 15:04:28 +01:00
gingerBill
940b0c54bc
Add doc line to core:mem/virtual
2025-10-09 15:01:57 +01:00
gingerBill
a7af6055b0
Move memory mutex guard around for resize in virtual.Arena allocator
2025-09-27 10:27:08 +01:00
rationalcoder
710533975e
Fix out-of-band allocations in dynamic arenas
2025-09-16 16:31:10 -05:00
Damian Tarnawski
21fd7c200e
Add require_results attr to procs returning an allocator
2025-09-02 13:03:15 +02:00
alessio98888
c6db3cc670
Fix buddy allocator assert
...
The last address of "data" is not "cast(uintptr)raw_data(data)+cast(uintptr)size" but
"cast(uintptr)raw_data(data)+cast(uintptr)(size-1)".
The original assert would fail when for example the allocation size requested and the buddy allocator allignment were both 64.
2025-08-16 19:50:06 +02:00
gingerBill
7642e0a0e0
Require @(init) and @(fini) to be proc "contextless" ()
2025-08-08 12:10:01 +01:00
gingerBill
bb4bc316a4
for in string16; Support string16 across core
2025-08-02 12:20:35 +01:00
gingerBill
a2e7a62a26
Add virtual.new_clone
2025-07-30 23:14:53 +01:00
Feoramund
a0efdf26a6
mem: Clarify Buddy_Allocator requirements
2025-07-22 10:52:55 -04:00
gingerBill
0dd0a3813b
Fix very subtle bug in virtual.memory_block_alloc
2025-07-20 15:32:22 +01:00
Feoramund
4d4356e806
mem: Guard against Buddy_Allocator overwriting metadata
2025-06-20 06:44:44 -04:00
Feoramund
bfa0e1110a
mem: Don't print Buddy_Allocator.tail
...
This is always a pointer past the end of the buffer given to
`buddy_allocator_init`, which could be an invalid address. Printing may
result in a segmentation violation.
2025-06-20 06:41:42 -04:00
Feoramund
c2f3d074e3
mem: Forbid construction of Buddy_Allocator with insufficient space
...
This takes into account eventual alignment.
2025-06-19 19:41:39 -04:00
Feoramund
57e2d8f1dd
mem: Fix Buddy_Allocator size calculation to truly include alignment
...
This didn't take into account the size of the header plus the size of
the allocation itself by virtue of `align_forward_uint`; this could
result in no change if `size` was equal to `b.alignment` because the
number is aligned, and if `actual_size` and `size` ended up being equal,
no additional space would be requested.
This meant that a block would end up being allocated on top of its
buddy's head.
Fixes #3435
2025-06-19 19:41:38 -04:00
Feoramund
4e9f15965a
mem: Fix inverted condition in buddy_allocator_alloc_bytes_non_zeroed
...
This was causing the procedure to find a block, then find one again,
or to not find a block and not try again.
2025-06-19 19:33:51 -04:00
Feoramund
7526549e51
Disable usage of AddressSanitizer (pt. 2)
2025-06-15 15:34:18 -04:00