From 0464b7765aa4d1fc2178e443a3b37d19cfe541a0 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 2 Mar 2025 21:45:51 +0200 Subject: add ideal allocation tracker + Kind of like CHERI, but uses out-of-line pointer information. The idea is that a core that is compatible with ALLOC_IF queries the allocation tracker if an address is legal and gets a response. This ideal tracker effectively has infinite memory and doesn't talk to any other components, but a real implementation might want to limit the allocations per process or chat with some reserved memory region somewhere else in the system to maintain a binary tree or something. --- src/ideal_noc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ideal_noc.c') diff --git a/src/ideal_noc.c b/src/ideal_noc.c index 0ebc17e..d2816d6 100644 --- a/src/ideal_noc.c +++ b/src/ideal_noc.c @@ -17,7 +17,7 @@ struct noc { struct component **lower; /* countedby[elems] */ }; -stat ideal_noc_receive(struct noc *n, struct component *from, struct packet pkt) +static stat ideal_noc_receive(struct noc *n, struct component *from, struct packet pkt) { (void)from; /* unused */ uint32_t elem; @@ -33,7 +33,7 @@ stat ideal_noc_receive(struct noc *n, struct component *from, struct packet pkt) return OK; } -stat ideal_noc_clock(struct noc *n) +static stat ideal_noc_clock(struct noc *n) { size_t counter = n->latency == 0 ? 0 : (n->counter + 1) % n->latency; if (counter != 0) @@ -78,7 +78,7 @@ stat ideal_noc_clock(struct noc *n) return OK; } -void ideal_noc_destroy(struct noc *n) +static void ideal_noc_destroy(struct noc *n) { free(n->in); free(n->out); -- cgit v1.3