aboutsummaryrefslogtreecommitdiff
path: root/core/container/pool/pool_arena_others.odin
blob: d2e01ffb7d5801072b20920f0db297903ed40d76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#+build !darwin
#+build !freebsd
#+build !openbsd
#+build !netbsd
#+build !linux
#+build !windows
#+private
package container_pool

import "base:runtime"

_Pool_Arena :: runtime.Arena

_DEFAULT_BLOCK_SIZE :: runtime.Megabyte

_pool_arena_init :: proc(arena: ^Pool_Arena, block_size: uint = DEFAULT_BLOCK_SIZE) -> (err: runtime.Allocator_Error) {
	runtime.arena_init(arena, block_size, runtime.default_allocator()) or_return
	return
}

_pool_arena_allocator :: proc(arena: ^Pool_Arena) -> runtime.Allocator {
	return runtime.arena_allocator(arena)
}

_pool_arena_destroy :: proc(arena: ^Pool_Arena) {
	runtime.arena_destroy(arena)
}