diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-07-04 07:20:40 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-07-04 07:20:40 -0700 |
commit | f47ad62b88bcff263c3f14b3107968efffd8378a (patch) | |
tree | 730934d21b4c11354d138530370d499e78f1458a /gc.c | |
parent | 1a80dcbb725b8197369048a3eff4492e9797567f (diff) | |
download | txr-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 'gc.c')
-rw-r--r-- | gc.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -754,6 +754,7 @@ void gc(void) save_context(mc); gc_enabled = 0; rcyc_empty(); + iobuf_list_empty(); mark(&mc, &gc_stack_top); hash_process_weak(); prepare_finals(); |