diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-03-02 21:45:51 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-03-02 21:45:51 +0200 |
| commit | 0464b7765aa4d1fc2178e443a3b37d19cfe541a0 (patch) | |
| tree | 7df54d44f11bcba1c9271148f085501bc2a02d2e /src/ideal_noc.c | |
| parent | ad6107d33a8a222d9062aae45d0e8d8483939d5d (diff) | |
| download | gran-0464b7765aa4d1fc2178e443a3b37d19cfe541a0.tar.gz gran-0464b7765aa4d1fc2178e443a3b37d19cfe541a0.zip | |
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.
Diffstat (limited to 'src/ideal_noc.c')
| -rw-r--r-- | src/ideal_noc.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |
