aboutsummaryrefslogtreecommitdiff
path: root/memstack/include
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-07-19 09:43:50 -0700
committer3gg <3gg@shellblade.net>2025-07-19 09:43:50 -0700
commitb905c803f35ee41ed894a108cc8fa114a2a58b88 (patch)
treef67bb65087208fa85b30011a07e8e23bd8e7ef9a /memstack/include
parent75705ca3d91930a730743b5319268087fc7bc56e (diff)
Add functions to get and set the watermarkHEADmain
Diffstat (limited to 'memstack/include')
-rw-r--r--memstack/include/memstack.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/memstack/include/memstack.h b/memstack/include/memstack.h
index 97a9d12..93cd2e6 100644
--- a/memstack/include/memstack.h
+++ b/memstack/include/memstack.h
@@ -32,6 +32,12 @@ void memstack_del(memstack*);
32/// Clear the stack. 32/// Clear the stack.
33void memstack_clear(memstack*); 33void memstack_clear(memstack*);
34 34
35/// Return the top of the stack.
36size_t memstack_watermark(const memstack*);
37
38/// Set the top of the stack.
39void memstack_set_watermark(memstack*, size_t watermark);
40
35/// Allocate a new block. 41/// Allocate a new block.
36/// 42///
37/// Return null if the block does not fit in the remaining memory. 43/// Return null if the block does not fit in the remaining memory.