about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-10 11:41:04 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-10 11:41:04 -0700
commit4ae08e006651aa06b0100a81b35df43ba28ad6d3 (patch)
treea7d8f0bbbeb6898b3491e2b06c8d9faddc08f006
parentc5f7d9dd5783dd7e0c4fa3959caef1438b0994a8 (diff)
downloadmu-4ae08e006651aa06b0100a81b35df43ba28ad6d3.tar.gz
.
-rw-r--r--subx/apps/subx-common.subx2
1 files changed, 2 insertions, 0 deletions
diff --git a/subx/apps/subx-common.subx b/subx/apps/subx-common.subx
index 083e6cc2..70045a2b 100644
--- a/subx/apps/subx-common.subx
+++ b/subx/apps/subx-common.subx
@@ -25,6 +25,7 @@
 #     aborts if not found
 #   get-or-insert-slice(stream, slice, row-size)
 #     inserts if not found
+# Beware: the '-slice' variants leak memory on every call.
 
 # 'table' is a stream of (key, value) rows
 # keys are always strings (addresses; size 4 bytes)
@@ -193,6 +194,7 @@ $test-get:end:
 # values may be any type, but rows (key+value) always occupy 'row-size' bytes
 # scan 'table' for a row with a key 'key' and return the address of the corresponding value
 # if no row is found, abort
+# WARNING: leaks memory
 get-slice:  # table : (address stream {string, _}), key : (address slice), row-size : int -> EAX : (address _)
     # pseudocode:
     #   curr = table->data