Commit Graph

438 Commits

Author SHA1 Message Date
flysand7 7c9d2f61f5 [mem]: Update package documentation 2024-09-07 15:16:20 +11:00
flysand7 6017a20e1c [mem]: Make resize_bytes take a slice for the old memory 2024-09-07 15:11:04 +11:00
flysand7 2d988bbc5f [mem]: Rename alloc to alloc_bytes and add alloc 2024-09-07 14:45:15 +11:00
flysand7 64814f4199 [mem]: Document the package 2024-09-07 14:19:50 +11:00
flysand7 c0112d1c70 [mem]: Add free_all for buddy allocator 2024-09-07 13:27:17 +11:00
flysand7 c0e17808d4 [mem]: Split alloc and alloc_non_zeroed for buddy allocator 2024-09-07 13:26:09 +11:00
flysand7 6d3cffa13c [mem]: Add @require_results to all functions returning values 2024-09-07 13:14:58 +11:00
flysand7 b350a35b77 [mem]: Add resize_non_zeroed variant to dynamic arena, and rename pool to arena 2024-09-07 13:10:29 +11:00
flysand7 03f6b9bbf6 [mem]: Add alloc_non_zeroed variant to dynamic pool 2024-09-07 12:59:19 +11:00
flysand7 f8641ddd1b [mem]: Rename dynamic pool to dynamic arena 2024-09-07 12:33:12 +11:00
flysand7 aea3e9a585 [mem]: Fix vet errors 2024-09-07 12:26:47 +11:00
flysand7 4843db0960 [mem]: API for using small stack allocator directly 2024-09-07 12:23:55 +11:00
flysand7 de220a9aa5 [mem]: Remove the extra word 'allocator' in procedures 2024-09-07 11:07:06 +11:00
flysand7 9750b64096 [mem]: API for using stack allocator directly 2024-09-07 10:55:54 +11:00
flysand7 834f082dba [mem]: Initialize scratch allocator during calls to free and resize 2024-09-07 10:24:00 +11:00
flysand7 e5106e48a8 [mem]: API for using scratch allocator directly 2024-09-07 10:09:05 +11:00
flysand7 da6213196d [mem]: API for using arena directly 2024-09-07 09:42:04 +11:00
flysand7 2b9096517c [mem]: Code formatting 2024-09-07 09:20:56 +11:00
Laytan Laats 5a22d49b72 mem/virtual: make sure the given size is used for subsequent blocks 2024-08-29 14:48:36 +02:00
Laytan Laats fd2ad20cd4 mem/virtual: use sysconf for retrieving page size and actually use these init procs 2024-08-29 14:36:32 +02:00
Feoramund d43c6e39f6 Fix #4151
The `core:mem` procs were calling the wrong `runtime` procs for their
number of arguments.
2024-08-26 13:23:04 -04:00
gingerBill e810c3eace Merge pull request #4012 from laytan/posix
core:sys/posix and core:os/os2 based on it (for darwin, netbsd, freebsd and openbsd)
2024-08-14 15:10:31 +01:00
Laytan Laats 7c9ca60ff0 mem/virtual: support the BSDs 2024-08-14 01:44:37 +02:00
Laytan Laats efe68c2e24 posix: add package 2024-08-14 01:44:35 +02:00
Laytan 3847d03248 Merge pull request #3281 from erjohnson/patch-1
Update mem doc example formatting
2024-08-14 00:10:03 +02:00
Laytan Laats bb54a0a972 fix whitespace 2024-08-14 00:08:46 +02:00
gingerBill 93fabf8628 Replace err != 0 with err != nil where possible 2024-08-04 14:57:25 +01:00
Jeroen van Rijn a8ce5bd005 Merge pull request #3903 from laytan/allow-mem-virtual-import-on-more-targets
allow `core:mem/virtual` import on more targets by expanding the `other` implementation
2024-07-11 02:12:53 +02:00
Laytan Laats 0dfc660c71 allow core:mem/virtual import on more targets by expanding the other implementation 2024-07-11 01:55:59 +02:00
Laytan Laats 2d8d0dd851 fix @(optimization_mode) usage in builtin collections 2024-07-08 21:07:53 +02:00
DerTee 6b373cf49e fix #3692 memory alignment bug in core:mem.dynamic_pool_alloc_bytes 2024-07-03 22:14:28 +02:00
gingerBill e296d6fb90 Fix loads of indentation issues with mixing spaces and tabs 2024-06-29 19:50:51 +01:00
gingerBill 5413a8b744 Even more style fixes 2024-06-29 19:11:36 +01:00
Laytan Laats 1c199f52d6 tlsf: destroy first pool & properly zero memory 2024-06-27 19:27:07 +02:00
Jeroen van Rijn 28ea9425fd Add core:mem tests. 2024-06-06 14:59:19 +02:00
Jeroen van Rijn 72f6b5479d Fix fls_uint 2024-06-06 14:42:19 +02:00
Jeroen van Rijn 0b6d73c86e Add original LICENSE 2024-06-06 14:29:28 +02:00
gingerBill fac9ce5d83 Change to init from create 2024-06-05 15:30:35 +01:00
gingerBill d3342c2381 core:mem/tlsf - "Two-Level Segregated Fit" memory allocator 2024-06-05 15:15:39 +01:00
Jeroen van Rijn c3b94b9e1d Merge pull request #3646 from Feoramund/multi-test
Refactor the test runner
2024-06-04 13:23:52 +02:00
Feoramund d7f6def8ad Add aliases for Raw_* complex/quaternion types into core:mem 2024-06-03 17:18:27 -04:00
Feoramund 4e1dd4ced2 Move Raw_Complex/Quaternion types to base:runtime 2024-06-03 15:40:28 -04:00
Feoramund ccdbd4b6ce Simplify casts in mem.Rollback_Stack procs 2024-06-02 14:54:32 -04:00
Feoramund bf42e39b1c Be specific about int size for Rollback_Stack asserts
This should fix tests failing on 32-bit platforms.
2024-06-02 14:47:07 -04:00
Feoramund 89d8df28be Combine multi-line attributes onto one line 2024-06-02 14:47:07 -04:00
Feoramund eadfbb1318 Forbid singleton allocations from shrinking their block offset 2024-06-02 14:47:06 -04:00
Feoramund 09ef08f035 Add more sanity checking to mem.Rollback_Stack 2024-06-02 14:47:06 -04:00
Feoramund 0f675fa436 Use uintptr where applicable in mem.Rollback_Stack 2024-06-02 14:47:06 -04:00
Feoramund 568b746c98 Fix indentation 2024-06-02 14:47:06 -04:00
Feoramund 50dffaf131 Add mem.Rollback_Stack 2024-06-02 14:34:30 -04:00