gingerBill
5c298c1501
Minor text alignment
2022-08-15 10:22:32 +01:00
gingerBill
5e3cf45df3
Add #soa pointer type to aid with refactoring to #soa data types
...
a: #soa[16]Foo
p := &a[6]
#assert(type_of(p) == #soa^#soa[16]Foo)
p^.x = 123
p.x = 123
2022-08-08 15:07:00 +01:00
gingerBill
0e6a8b7c72
Make Growing_Arena reserve memory first and then commit as needed
...
It just committed all at once to begin with
2022-08-08 12:43:18 +01:00
gingerBill
147848ca20
Clean up naming conventions
2022-08-08 12:30:58 +01:00
gingerBill
c97a8418dc
Clean-up and unification for the allocation procedures
2022-08-08 12:23:19 +01:00
gingerBill
4aca9372a6
Improve resize call
2022-08-08 12:11:30 +01:00
Christoffer Lerno
f45e8e5d47
Added virtual memory headers for Darwin.
2022-07-29 20:01:26 +02:00
gingerBill
ca1f419dc2
Merge pull request #1819 from IanLilleyT/no_query_info
...
Allocator: tidying up Query_Info return values when not part of Query_Features
2022-06-12 17:15:08 +01:00
gingerBill
d04f732e68
Add fmt:"s,0" to allow arrays and multi-pointers to be printed with NUL termination
2022-06-12 13:07:43 +01:00
gingerBill
fb49841b1d
Remove strings dependency from core:sys/windows
2022-06-02 13:02:16 +01:00
Ian Lilley
dda2ed290a
tidying up Query_Info return value when not in query features
2022-06-01 22:40:39 -04:00
Ian Lilley
66de1856e3
tighter allocation for arena allocator
2022-06-01 21:37:05 -04:00
gingerBill
a1f15c2c69
Merge pull request #1807 from odin-lang/simd-dev
...
Generic #simd type and intrinsics
2022-05-31 11:52:24 +01:00
jason
10deb2e88b
fix mmap call in virtual_linux.odin
2022-05-25 21:51:36 -04:00
gingerBill
63d6c08d90
Add raw_simd_data
2022-05-25 22:09:38 +01:00
gingerBill
7d2eedee73
Unify raw_data in core:mem with core:runtime
2022-05-23 11:47:12 +01:00
gingerBill
10f1d8c604
Fix typo
2022-05-21 13:38:38 +01:00
gingerBill
3049e07f72
Add mem.DEFAULT_PAGE_SIZE
2022-05-21 13:30:09 +01:00
gingerBill
0cc67ff5e3
Add a return value to mem.zero_item and mem.zero_slice which is the same as the input
2022-05-17 22:42:37 +01:00
gingerBill
e10105a780
Correct logic for tracking allocator proc for freeing a nil pointer
2022-05-15 23:50:51 +01:00
gingerBill
5451c9672d
Fix dynamic_pool_destroy
2022-05-15 23:48:11 +01:00
Jeroen van Rijn
fe442d7c0c
[mem] Fix Dynamic_Pool.
2022-05-05 10:45:15 +02:00
gingerBill
a412d34574
Fix #1740
2022-04-26 11:35:34 +01:00
Jeroen van Rijn
7654afc2db
Revert "Update mem.nil_allocator to match the same in runtime"
...
The change broke JSON unmarshaling.
This reverts commit 4484a3433d .
2022-04-19 15:01:54 +02:00
gingerBill
ed4cb72b19
Merge pull request #1696 from Despacito696969/master
...
Fix for `slice_to_components` compilation error
2022-04-16 21:56:13 +01:00
hikari
698fcb7813
mem: replace size procedures with constants
2022-04-06 18:44:43 +03:00
Despacito696969
7f6c6945ae
Fix for slice_to_components
...
Using `slice_to_components` wouldn't compile because `s.data` is type of `rawptr` and return type is `^T`
2022-04-05 20:17:47 +02:00
gingerBill
4484a3433d
Update mem.nil_allocator to match the same in runtime
2022-03-31 15:03:56 +01:00
gingerBill
9f2d710c35
Change intrinsics.Atomic_Memory_Order fields to use Ada_Case rather than snake_case
2022-03-31 12:57:24 +01:00
gingerBill
ba1930eb01
Update core to use new atomic intrinsics
2022-03-31 00:22:54 +01:00
gingerBill
4eb4ae6305
Replace sync with sync2
2022-03-30 17:42:44 +01:00
gingerBill
7e5342f41f
Use contextless where possible
2022-03-01 15:52:14 +00:00
gingerBill
18607e53cb
Correct alloc_from_memory_block
2022-03-01 15:38:04 +00:00
Jeroen van Rijn
f971126183
[mem] Add missing \n to tracking allocator example.
2022-03-01 13:51:41 +01:00
Jeroen van Rijn
a3d99765cc
mem: Add doc.odin with Tracking_Allocator example.
2022-02-05 22:18:22 +01:00
Yawning Angel
61c581baeb
core/sys/unix: Add syscalls_linux.odin
...
Linux is in the unfortunate situation where the system call number is
architecture specific. This consolidates the system call number
definitions in a single location, adds some wrappers, and hopefully
fixes the existing non-portable invocations of the syscall intrinsic.
2021-11-17 14:00:00 +00:00
Yawning Angel
672fc9fc4d
core/mem: Add zero_explicit
...
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
}
```
2021-10-31 22:57:13 +00:00
gingerBill
aaaddd03a6
Improve internal procedures
2021-10-25 01:28:06 +01:00
gingerBill
58e3f779f2
Remove nonsense from static_arena_init
2021-10-05 17:12:24 +01:00
gingerBill
455d64fbd4
Add error value to commit
2021-10-05 17:11:12 +01:00
gingerBill
16ca677c1f
Correct mmap usage
2021-10-05 17:05:33 +01:00
gingerBill
1f1434b384
Add arena_util.odin
2021-10-05 16:42:42 +01:00
gingerBill
f83370235f
Add static_arena_bootstrap_new
2021-10-05 16:39:14 +01:00
gingerBill
4961aff51b
Minor cleanup
2021-10-05 16:37:15 +01:00
gingerBill
0ed3143006
Merge branch 'master' of https://github.com/odin-lang/Odin
2021-10-05 16:28:25 +01:00
gingerBill
bc2b8b597c
Add virtual.Static_Arena
2021-10-05 16:28:14 +01:00
gingerBill
ccc4c641c4
Clean up Memory_Block logic
2021-10-05 16:25:30 +01:00
Jeroen van Rijn
1931e3147d
Remove assert from mem.ptr_to_bytes. Fixes #1206
2021-10-05 14:18:48 +02:00
gingerBill
9d9ec192f1
Rename to growing_arena.odin
2021-10-04 17:57:59 +01:00
gingerBill
586a000152
Add Protect_Flags for virtual.protect
2021-10-04 17:42:15 +01:00