aboutsummaryrefslogtreecommitdiff
path: root/core/mem
Commit message (Collapse)AuthorAgeFilesLines
* core:os -> core:os/old && core:os/os2 -> core:osJeroen van Rijn6 days2-3/+3
|
* Remove all `core:os` imports from JS targetsJeroen van Rijn6 days2-15/+18
| | | | Fix `local_tz_name` on FreeBSD.
* More conflicts during rebaseJeroen van Rijn7 days1-8/+8
|
* mem.virtual -> os2Jeroen van Rijn7 days6-11/+49
|
* Merge pull request #5859 from odin-lang/bill/change-licensedev-2025-11gingerBill2025-11-042-2/+2
|\ | | | | Change Odin's LICENSE to zlib from BSD 3-clause
| * Correct license for tlsfbill/change-licensegingerBill2025-10-292-2/+2
| |
| * Change Odin's LICENSE to zlib from BSD 3-clausegingerBill2025-10-282-2/+2
| | | | | | | | 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.
* | Typo in description of mem.ptr_sub.Daniel TroszczyƄski2025-10-301-2/+2
|/
* Fix indentationgingerBill2025-10-271-2/+2
|
* Add `Raw_String16`/`Raw_Cstring16` to `core:mem`gingerBill2025-10-101-0/+11
|
* Further overhaul of package line comments.Jeroen van Rijn2025-10-093-3/+3
|
* More package lines.Jeroen van Rijn2025-10-093-6/+5
|
* Fix typogingerBill2025-10-091-1/+1
|
* Add doc line to `core:mem/virtual`gingerBill2025-10-091-0/+62
|
* Move memory mutex guard around for resize in virtual.Arena allocatorgingerBill2025-09-271-2/+16
|
* Fix out-of-band allocations in dynamic arenasrationalcoder2025-09-161-8/+8
|
* Add require_results attr to procs returning an allocatorDamian Tarnawski2025-09-021-0/+1
|
* Fix buddy allocator assertalessio988882025-08-161-1/+1
| | | | | | | 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.
* Require `@(init)` and `@(fini)` to be `proc "contextless" ()`gingerBill2025-08-085-8/+8
|
* `for in string16`; Support `string16` across coregingerBill2025-08-021-1/+1
|
* Add `virtual.new_clone`gingerBill2025-07-301-0/+11
|
* mem: Clarify `Buddy_Allocator` requirementsFeoramund2025-07-221-1/+4
|
* Fix very subtle bug in `virtual.memory_block_alloc`gingerBill2025-07-201-2/+2
|
* mem: Guard against `Buddy_Allocator` overwriting metadataFeoramund2025-06-201-0/+1
|
* mem: Don't print `Buddy_Allocator.tail`Feoramund2025-06-201-1/+1
| | | | | | 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.
* mem: Forbid construction of `Buddy_Allocator` with insufficient spaceFeoramund2025-06-191-0/+1
| | | | This takes into account eventual alignment.
* mem: Fix `Buddy_Allocator` size calculation to truly include alignmentFeoramund2025-06-191-6/+8
| | | | | | | | | | | | | 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
* mem: Fix inverted condition in `buddy_allocator_alloc_bytes_non_zeroed`Feoramund2025-06-191-1/+1
| | | | | This was causing the procedure to find a block, then find one again, or to not find a block and not try again.
* Disable usage of AddressSanitizer (pt. 2)Feoramund2025-06-151-4/+4
|
* Merge branch 'master' into fix-2694Feoramund2025-06-151-20/+56
|\
| * mem: compat allocator improvementsLaytan Laats2025-06-121-20/+56
| | | | | | | | | | | | | | | | | | 1. store alignment instead of original pointer 2. implement .Query_Info 3. poison the header and alignment portion of the allocation 4. .Resize uses `max(orig_alignment, new_alignment)` as it's alignment now 5. .Free passes along the original alignment
* | Disable usage of AddressSanitizer pending a per-allocator reviewFeoramund2025-06-155-85/+101
| | | | | | | | | | | | | | | | | | | | | | It has been discovered that AddressSanitizer does not keep a 1:1 mapping of which bytes are poisoned and which are not. This can cause issues for allocations less than 8 bytes and where addresses straddle 8-byte boundaries. See the following link for more information: https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm#mapping
* | mem: Standardize panic messagesFeoramund2025-06-151-14/+14
| |
* | mem: Review all documentation commentsFeoramund2025-06-151-129/+140
| |
* | mem: Poison memory for `Buddy_Allocator`Feoramund2025-06-151-7/+15
| |
* | mem: Guard against size 0 in `dynamic_arena_resize_*`Feoramund2025-06-151-0/+8
| |
* | mem: Poison memory for `Dynamic_Arena`Feoramund2025-06-151-0/+7
| |
* | mem: Make `dynamic_arena_alloc` not privateFeoramund2025-06-151-1/+1
| | | | | | | | | | None of the other `*_alloc` procs are private, and this proc is even referenced in public documentation comments.
* | mem: Remove bogus commentsFeoramund2025-06-151-12/+0
| | | | | | | | There is no `dynamic_arena_free`; the mode is not implemented
* | mem: Remove comment about calling `panic`Feoramund2025-06-151-1/+0
| | | | | | | | The behavior is codified in the comment as returning `Invalid_Pointer`.
* | mem: Remove trailing whitespaceFeoramund2025-06-151-1/+1
| |
* | mem: Panic when passing invalid pointers to small stack free/resizeFeoramund2025-06-151-4/+2
| | | | | | | | This is consistent with `Stack_Allocator`.
* | mem: Correct wrong error messageFeoramund2025-06-151-1/+1
| |
* | mem: Check if `alignment` matches on `Small_Stack` resizeFeoramund2025-06-151-0/+10
| |
* | mem: Make `small_stack_resize*` free if `size` is 0Feoramund2025-06-151-1/+1
| |
* | mem: Clarify what happens when you free out-of-order in a `Small_Stack`Feoramund2025-06-151-1/+4
| |
* | mem: Replace `auto_cast`Feoramund2025-06-151-1/+1
| |
* | mem: Don't unpoison the header of a `Small_Stack` allocationFeoramund2025-06-151-2/+4
| |
* | mem: Poison unused memory more thoroughlyFeoramund2025-06-141-0/+3
| |
* | mem: Check if `alignment` matches on `Stack_Allocator` resizeFeoramund2025-06-141-0/+10
| |