summaryrefslogtreecommitdiffstats
path: root/stream.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-07-04 07:20:40 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-07-04 07:20:40 -0700
commitf47ad62b88bcff263c3f14b3107968efffd8378a (patch)
tree730934d21b4c11354d138530370d499e78f1458a /stream.h
parent1a80dcbb725b8197369048a3eff4492e9797567f (diff)
downloadtxr-f47ad62b88bcff263c3f14b3107968efffd8378a.tar.gz
txr-f47ad62b88bcff263c3f14b3107968efffd8378a.tar.bz2
txr-f47ad62b88bcff263c3f14b3107968efffd8378a.zip
sha256: recycle I/O buffer used in stream hash.
* chksum.c (sha256_stream): Use iobuf_get and iobuf_put. * gc.c (gc): Do not mark the list of recycled buffers; just consider them to be garbage and clear the list, like we do with recycled conses via rcyc_empty. * stream.c (iobuf_free_list): New static variable. (iobuf_get, iobuf_put, iobuf_list_empty): New functions. * stream.h (iobuf_get, iobuf_put, iobuf_list_empty): Declared.
Diffstat (limited to 'stream.h')
-rw-r--r--stream.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/stream.h b/stream.h
index 2887b305..bc83122c 100644
--- a/stream.h
+++ b/stream.h
@@ -240,5 +240,7 @@ val base_name(val path);
val dir_name(val path);
val path_cat(val dir_name, val base_name);
val make_byte_input_stream(val obj);
-
+val iobuf_get(void);
+void iobuf_put(val buf);
+void iobuf_list_empty(void);
void stream_init(void);