From 62f04ff585edd4f932f18ecad109f1d0213973a6 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Thu, 22 Apr 2021 14:08:40 -0700 Subject: chore(refactor): libraries to define explicit interfaces --- sys/libn/memory.c | 3 ++- sys/rules.mk | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) (limited to 'sys') diff --git a/sys/libn/memory.c b/sys/libn/memory.c index 999819b..d7df8e3 100644 --- a/sys/libn/memory.c +++ b/sys/libn/memory.c @@ -25,7 +25,7 @@ void * return realloc(ptr, n*size); } -mem·Allocator mem·sys = { +mem·Allocator sys·Memory = { .alloc = ·alloc, .free = ·free }; @@ -120,6 +120,7 @@ mem·makearena(mem·Allocator from, void *impl) return a; } +static void grow(mem·Arena *a, vlong min) { diff --git a/sys/rules.mk b/sys/rules.mk index 669ea25..385c9ac 100644 --- a/sys/rules.mk +++ b/sys/rules.mk @@ -8,19 +8,25 @@ include share/push.mk DIR := $(d)/cmd include $(DIR)/rules.mk -# DIR := $(d)/haplotile -# include $(DIR)/rules.mk - DIR := $(d)/libn include $(DIR)/rules.mk -# DIR := $(d)/libterm -# include $(DIR)/rules.mk - DIR := $(d)/libmath include $(DIR)/rules.mk DIR := $(d)/libbio include $(DIR)/rules.mk +# DIR := $(d)/libimage +# include $(DIR)/rules.mk + +# DIR := $(d)/libfont +# include $(DIR)/rules.mk + +# DIR := $(d)/libterm +# include $(DIR)/rules.mk + +# DIR := $(d)/libsre +# include $(DIR)/rules.mk + include share/pop.mk -- cgit v1.2.1