Skip to content

Commit 32fed11

Browse files
committed
docs(changelog): stdin servers give memory back
1 parent 917342b commit 32fed11

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ first stable `1.0.0` tag; pre-1.0 `alpha` / `rc` tags may still change surfaces.
99

1010
### Fixed
1111

12+
- **A long-running server that reads stdin now gives memory back.** The
13+
`*in*` and `System/in` readers kept every byte they had ever read; they now
14+
drop what has been consumed. While the main thread waits on stdin, each idle
15+
second runs a collect (when at least 1 MiB was allocated since the last one)
16+
and returns freed memory to the OS, so garbage left by `future`s and worker
17+
threads no longer waits for the next request. Socket and `StringBuilder`
18+
buffers now count toward the collect trigger. A bb-mcp-shaped probe (20
19+
`future`s each building 4 MB of JSON, then idle) settles at 129 MB instead
20+
of holding 955 MB.
21+
1222
- **A `wasm/call` on the JIT no longer costs time proportional to the
1323
module.** zwasm resolved the export by re-parsing the module on every call;
1424
it now reads the export table built at compile. A trivial export of a 47 KB

0 commit comments

Comments
 (0)