lobsters__saccharin@crustaceanson.theshelf.topM to Lobsters - all tags@crustaceanson.theshelf.topEnglish · 25 days ago[zig] Zig 0.17.0 Release Noteslockziglang.orgexternal-linkmessage-square9linkfedilinkarrow-up11file-textcross-posted to: hackernews@lemmy.bestiver.se
arrow-up11external-link[zig] Zig 0.17.0 Release Noteslockziglang.orglobsters__saccharin@crustaceanson.theshelf.topM to Lobsters - all tags@crustaceanson.theshelf.topEnglish · 25 days agomessage-square9linkfedilinkfile-textcross-posted to: hackernews@lemmy.bestiver.se
minus-squarelobsters__matklad@crustaceanson.theshelf.topMlinkfedilinkarrow-up1·24 days agoYou can free memory without re-using it, thanks to virtual memory. See https://codeberg.org/ziglang/zig/src/commit/996321250d9a9438fc65fcfe64a0d6ada04e50a0/lib/std/heap/PageAllocator.zig#L43 You can ask OS to always give you a fresh address, even if you give completely free pages back. (of course, if anything on the page is alive, you can’t give it back). score 2 · canonical
minus-squarelobsters__fanf@crustaceanson.theshelf.topMlinkfedilinkarrow-up1·24 days ago You can free memory without re-using it, thanks to virtual memory. And thanks to 64 bit address spaces :-) It’s quite easy to consume 4GB at even relatively modest allocation rates. score 1 · canonical
You can free memory without re-using it, thanks to virtual memory. See
https://codeberg.org/ziglang/zig/src/commit/996321250d9a9438fc65fcfe64a0d6ada04e50a0/lib/std/heap/PageAllocator.zig#L43
You can ask OS to always give you a fresh address, even if you give completely free pages back. (of course, if anything on the page is alive, you can’t give it back).
score 2 · canonical
And thanks to 64 bit address spaces :-) It’s quite easy to consume 4GB at even relatively modest allocation rates.
score 1 · canonical