aboutsummaryrefslogtreecommitdiff
path: root/core/mem
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2025-01-01 15:13:46 +0000
committergingerBill <bill@gingerbill.org>2025-01-01 15:13:46 +0000
commit1cf7a56ba700b8a20b4fe94459db416679501793 (patch)
treeaf19c846aed4a098971895c76def59d156ec7322 /core/mem
parent6383fddb59cfcd3f0c8eefb2c700381d14488691 (diff)
General clean up of code
Diffstat (limited to 'core/mem')
-rw-r--r--core/mem/allocators.odin23
-rw-r--r--core/mem/mem.odin9
2 files changed, 1 insertions, 31 deletions
diff --git a/core/mem/allocators.odin b/core/mem/allocators.odin
index 13d509f1e..028be58e3 100644
--- a/core/mem/allocators.odin
+++ b/core/mem/allocators.odin
@@ -140,14 +140,6 @@ arena_init :: proc(a: ^Arena, data: []byte) {
a.temp_count = 0
}
-@(deprecated="prefer 'mem.arena_init'")
-init_arena :: proc(a: ^Arena, data: []byte) {
- a.data = data
- a.offset = 0
- a.peak_used = 0
- a.temp_count = 0
-}
-
/*
Allocate memory from an arena.
@@ -786,14 +778,6 @@ stack_init :: proc(s: ^Stack, data: []byte) {
s.peak_used = 0
}
-@(deprecated="prefer 'mem.stack_init'")
-init_stack :: proc(s: ^Stack, data: []byte) {
- s.data = data
- s.prev_offset = 0
- s.curr_offset = 0
- s.peak_used = 0
-}
-
/*
Allocate memory from stack.
@@ -1162,13 +1146,6 @@ small_stack_init :: proc(s: ^Small_Stack, data: []byte) {
s.peak_used = 0
}
-@(deprecated="prefer 'small_stack_init'")
-init_small_stack :: proc(s: ^Small_Stack, data: []byte) {
- s.data = data
- s.offset = 0
- s.peak_used = 0
-}
-
/*
Small stack allocator.
diff --git a/core/mem/mem.odin b/core/mem/mem.odin
index ccbc77798..b2a7158a1 100644
--- a/core/mem/mem.odin
+++ b/core/mem/mem.odin
@@ -685,11 +685,4 @@ calc_padding_with_header :: proc "contextless" (ptr: uintptr, align: uintptr, he
}
}
return int(padding)
-}
-
-@(require_results, deprecated="prefer 'slice.clone'")
-clone_slice :: proc(slice: $T/[]$E, allocator := context.allocator, loc := #caller_location) -> (new_slice: T) {
- new_slice, _ = make(T, len(slice), allocator, loc)
- runtime.copy(new_slice, slice)
- return new_slice
-}
+} \ No newline at end of file