aboutsummaryrefslogtreecommitdiff
path: root/include/libn.h
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-09-28 13:39:24 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-09-28 13:39:24 -0700
commitbc53100f1ef063e09d77e8670e1796bc67017411 (patch)
treee84b23c3afceb88f75088be2749683b407d1cea2 /include/libn.h
parent83cd586ea304d6f6aa190c65ee796baaba1941a7 (diff)
Checkin: various small changes
Diffstat (limited to 'include/libn.h')
-rw-r--r--include/libn.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libn.h b/include/libn.h
index 2cf29c7..699786f 100644
--- a/include/libn.h
+++ b/include/libn.h
@@ -57,6 +57,7 @@ typedef struct mem·Allocator {
void *(*alloc)(void *heap, uint n, ulong size);
void (*free)(void *heap, void *ptr);
} mem·Allocator;
+
extern mem·Allocator sys·Memory;
typedef struct mem·Reallocator {
@@ -64,6 +65,7 @@ typedef struct mem·Reallocator {
void *(*realloc)(void *iface, void *ptr, uint n, ulong size);
void (*free)(void *iface, void *ptr);
} mem·Reallocator;
+
extern mem·Reallocator sys·Relocator;
/* simple memory arena */
@@ -73,6 +75,8 @@ mem·Arena *mem·makearena(mem·Allocator from, void*);
void *mem·arenaalloc(mem·Arena *A, uint n, ulong size);
void mem·freearena(mem·Arena *A);
+extern mem·Allocator mem·ArenaAllocator;
+
/* generalized memxxx functions */
void memset64(void *dst, uint64 val, uintptr size);