diff options
author | Nicholas <nbnoll@eml.cc> | 2021-11-20 20:12:21 -0800 |
---|---|---|
committer | Nicholas <nbnoll@eml.cc> | 2021-11-20 20:12:21 -0800 |
commit | 138fb272fae79587de3469493b55e4d18eadc722 (patch) | |
tree | 447d2af80b8c2ea080253e76d33e128c9b27d3f6 /src/base/mem/arena.c | |
parent | c9a32c1a43d2bdded07eaa45732c3a6e195a5442 (diff) |
Feat: added buffered io from plan9
As we no longer have the FILE type, we need to buffer our reading and
writing so that we don't have to make so many syscalls. The API is nice
so that we can buffer other readers. We will update it so that it eats
io·Readers/io·Writers.
Diffstat (limited to 'src/base/mem/arena.c')
-rw-r--r-- | src/base/mem/arena.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/base/mem/arena.c b/src/base/mem/arena.c index b2ce044..37e7b56 100644 --- a/src/base/mem/arena.c +++ b/src/base/mem/arena.c @@ -25,15 +25,13 @@ struct mem·Arena struct Block first; }; -static -void* +static void* ·arenaalloc(void *heap, uint n, ulong size) { return mem·arenaalloc(heap, n, size); } -static -void +static void ·arenafree(void *heap, void *ptr) { /* no-op */ @@ -45,8 +43,7 @@ mem·Allocator mem·ArenaAllocator = { }; -static -void +static void grow(mem·Arena *a, vlong min) { uintptr size; |