aboutsummaryrefslogtreecommitdiff
path: root/core/mem/mem.odin
Commit message (Collapse)AuthorAgeFilesLines
* Typo in description of mem.ptr_sub.Daniel Troszczyński2025-10-301-2/+2
|
* intJeroen van Rijn2025-05-271-1/+1
|
* Fix exampleJeroen van Rijn2025-05-271-1/+1
|
* ptr_sub prose clarificationJeroen van Rijn2025-05-271-5/+25
|
* Add `mem.make_over_aligned`gingerBill2025-03-311-1/+1
|
* Fix indentationgingerBill2025-03-311-21/+20
|
* General clean up of codegingerBill2025-01-011-8/+1
|
* Missing paren.Jeroen van Rijn2024-11-031-1/+1
|
* `mem.is_aligned` is in bytes, not log2 bytesJeroen van Rijn2024-11-031-1/+3
| | | | Fix formula and clarify comment
* [mem]: Adjust the docs for calc_padding_with_headerflysand72024-09-141-4/+20
|
* [mem]: Fix handling of default resize to check alignmentflysand72024-09-111-0/+11
|
* Fix typoflysand72024-09-081-1/+1
| | | Co-authored-by: FourteenBrush <74827262+FourteenBrush@users.noreply.github.com>
* [mem]: Fix the issue with unbranched version of ptr alignflysand72024-09-071-1/+1
|
* [mem]: Document mem.odinflysand72024-09-071-44/+404
|
* [mem]: Code formattingflysand72024-09-071-8/+8
|
* Minimize code duplication in `core:mem` by using the `base:runtime` callsgingerBill2024-04-031-0/+2
|
* Replace `core:*` to `base:*` where appropriategingerBill2024-01-281-2/+2
|
* Add formatting of bytes into the best unit of measurementLaytan Laats2023-09-011-0/+2
|
* Add missing `Allocator_Error` and `@(require_results)` to many proceduresgingerBill2023-05-221-0/+28
|
* Replaced opaque bit-shifts with readable constants for memory unitshikari2022-12-241-5/+5
|
* Unify mem and runtime logicgingerBill2022-08-261-42/+1
|
* Add `fmt:"s,0"` to allow arrays and multi-pointers to be printed with NUL ↵gingerBill2022-06-121-0/+6
| | | | termination
* Remove `strings` dependency from `core:sys/windows`gingerBill2022-06-021-1/+1
|
* Add a return value to `mem.zero_item` and `mem.zero_slice` which is the same ↵gingerBill2022-05-171-2/+4
| | | | as the input
* Merge pull request #1696 from Despacito696969/mastergingerBill2022-04-161-1/+1
|\ | | | | Fix for `slice_to_components` compilation error
| * Fix for `slice_to_components`Despacito6969692022-04-051-1/+1
| | | | | | Using `slice_to_components` wouldn't compile because `s.data` is type of `rawptr` and return type is `^T`
* | mem: replace size procedures with constantshikari2022-04-061-5/+6
|/
* Change `intrinsics.Atomic_Memory_Order` fields to use `Ada_Case` rather than ↵gingerBill2022-03-311-1/+1
| | | | `snake_case`
* Update core to use new atomic intrinsicsgingerBill2022-03-311-1/+1
|
* core/mem: Add zero_explicitYawning Angel2021-10-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | This call is intended to provide the ability to securely scrub memory without compiler interference, in a similar manner to explicit_bzero, memset_s, SecureZeroMemory. The approach taken is a volatile memset followed by a seqentially consistent memory fence, to prevent the call from being optimized away by DSE, and from being reordered. An identical approach is currently being used by the zeroize Rust crate, and is effective in practice. LLVM IR output: ``` ; Function Attrs: nounwind define internal i8* @mem.zero_explicit(i8* %0, i64 %1) #0 { decls: call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 %1, i1 true) fence seq_cst ret i8* %0 } ```
* Improve internal proceduresgingerBill2021-10-251-8/+2
|
* Remove assert from `mem.ptr_to_bytes`. Fixes #1206Jeroen van Rijn2021-10-051-1/+0
|
* Make `runtime.memset` use `int` for the length from `uint`gingerBill2021-09-231-1/+1
|
* Minor improvements to mem.odingingerBill2021-09-111-5/+8
|
* Fix typogingerBill2021-09-101-1/+1
|
* Add other constants to c and libcgingerBill2021-09-101-1/+1
|
* Unify `memset` usage across platforms and `core:c/libc`gingerBill2021-09-101-8/+1
|
* libc changes: unify c and libc types; Add `[^]T` where appropriategingerBill2021-09-101-2/+9
|
* Strip semicolons in core which were missinggingerBill2021-09-081-1/+4
|
* Correct "contextless" stuff in memgingerBill2021-09-081-13/+12
|
* Make many `mem` procedures `"contextless"`gingerBill2021-09-081-41/+44
|
* Strip even more semicolons if followed by a `}` or `)` on the same linegingerBill2021-08-311-4/+4
|
* Remove unneeded semicolons from the core librarygingerBill2021-08-311-101/+101
|
* Correct `mem.clone_slice`gingerBill2021-08-231-2/+2
|
* Remove deprecated procedure `slice_ptr_to_bytes`gingerBill2021-08-221-5/+0
|
* Use multi-pointers when appropriategingerBill2021-08-221-4/+3
|
* Rename `mem.reinterpret` to `mem.reinterpret_copy`gingerBill2021-08-201-1/+1
|
* Add `mem.reinterpret`gingerBill2021-08-201-0/+4
|
* Mark mem.slice_ptr_to_bytes as deprecated.Jeroen van Rijn2021-05-061-0/+1
| | | | | | | | | | | | | | | | Use byte_slice instead. We can't make it an alias *and* mark it as deprecated, regrettably: ```odin byte_slice :: #force_inline proc "contextless" (data: rawptr, len: int) -> []byte { return transmute([]u8)Raw_Slice{data=data, len=max(len, 0)}; } @(deprecated="use byte_slice") slice_ptr_to_bytes :: byte_slice; "mem.odin(145:1) Constant alias declarations cannot have attributes" ```
* Fix #906gingerBill2021-04-201-5/+6
|