Commit Graph

65 Commits

Author SHA1 Message Date
flysand7
4d65b1ab9c Implement new sys/unix package 2023-10-27 10:51:21 +11:00
gingerBill
27931249ce Scale by 3/2 rather than 5/4 2023-08-15 15:45:12 +01:00
gingerBill
52318d0e0e Improve heuristic for committing memory with virtual.alloc_from_memory_block 2023-08-15 15:42:28 +01:00
gingerBill
8d673789be Align committed to a page size 2023-08-15 15:20:23 +01:00
gingerBill
646c4c7458 alloc_from_memory_block to commit amounts equal to multiples of the DEFAULT_PAGE_SIZE 2023-08-15 15:12:12 +01:00
gingerBill
9736402dfd Fix docs typo 2023-08-07 15:34:28 +01:00
Eric Johnson
c6957e4e31 Fix small doc mistakes in arena.odin 2023-07-11 13:41:12 -07:00
gingerBill
9b54b99bf6 Use positional and named arguments within the core library 2023-06-21 01:17:05 +01:00
gingerBill
d37699f51a Add bsd to mem/virtual 2023-06-07 23:07:31 +01:00
gingerBill
dfee7c103e Document virtual.Arena 2023-02-28 13:07:52 +00:00
gingerBill
ecf65303cd Make arena_free_all keep the first memory block for a .Growing arena 2023-02-28 12:37:05 +00:00
gingerBill
7032867421 Pass #caller_location down correctly 2023-02-10 13:18:03 +00:00
gingerBill
802333e454 Fix arena.free_all 2023-02-03 12:40:52 +00:00
gingerBill
c45ca1bfcc Correct arena_temp_end usage when no allocation ever happens for that arena 2023-01-28 12:09:24 +00:00
gingerBill
8d6ce0b693 Add mutex to virtual.Arena; add virtual.arena_temp_ignore 2023-01-28 11:51:58 +00:00
hikari
d904ae5191 Replaced opaque bit-shifts with readable constants for memory units 2022-12-24 08:27:15 +02:00
gingerBill
f76316f889 Merge branch 'master' into allocator-mode-alloc-non-zeroed 2022-11-03 12:47:11 +00:00
gingerBill
7d217269b5 Add Arena_Kind.Buffer to core:mem/virtual 2022-10-26 13:37:20 +01:00
gingerBill
53e84b7f31 Remove doubly linked list of Platform_Memory_Block fields 2022-10-19 23:39:47 +01:00
gingerBill
ff51c5ee56 Wrap intrinsics.overflow_add to safe_add 2022-10-15 12:52:07 +01:00
gingerBill
7662808bc9 Add overflow_add checks to alloc_from_memory_block 2022-10-13 12:53:33 +01:00
gingerBill
d48828dd80 Add overflow check when using a growing arena 2022-10-13 12:45:17 +01:00
gingerBill
b725e01cdd Add @(require_results) to many procedures 2022-10-13 11:10:16 +01:00
gingerBill
cf4afc2e7b Inline assert condition 2022-10-12 21:26:50 +01:00
gingerBill
5ed06f7eb8 Rename constants; minor rearrange of Arena layout 2022-10-12 21:23:45 +01:00
gingerBill
765cd66b30 Clean up minimum_block_size default implicit initialization 2022-10-12 21:20:31 +01:00
gingerBill
5a8fbc230d Sanity corrections to virtual calls 2022-10-12 21:16:34 +01:00
gingerBill
5c62211f00 Inline resize logic for virtual.Arena 2022-10-12 20:44:36 +01:00
gingerBill
835b8ffa22 Update total_used for arena_static_reset_to 2022-10-12 20:30:48 +01:00
gingerBill
b84108c4b5 Inline align forward offset code 2022-10-12 20:28:51 +01:00
gingerBill
6642e1fc9d Unify Static_Arena and Growing_Arena into Arena 2022-10-12 19:10:04 +01:00
gingerBill
aebafdcd08 update virtual.growing_arena_bootstrap_new 2022-10-04 10:18:32 +01:00
gingerBill
7f601c9535 Add Allocator_Mode.Alloc_Non_Zerored 2022-09-22 12:12:57 +01:00
gingerBill
a35d6a6f8d Improve mem/virtual handling of out of memory on Windows 2022-09-12 17:06:32 +01:00
gingerBill
ca76d53452 Fix more typos 2022-08-31 11:07:31 +01:00
gingerBill
b0a09f7b9e Fix typo 2022-08-31 11:02:36 +01:00
Jeroen van Rijn
3469178dc1 Fix #1973. 2022-08-25 13:31:45 +02:00
gingerBill
5c298c1501 Minor text alignment 2022-08-15 10:22:32 +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
Christoffer Lerno
f45e8e5d47 Added virtual memory headers for Darwin. 2022-07-29 20:01:26 +02:00
jason
10deb2e88b fix mmap call in virtual_linux.odin 2022-05-25 21:51:36 -04:00
gingerBill
a412d34574 Fix #1740 2022-04-26 11:35:34 +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
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
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