aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv/Section.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-11-11 22:48:06 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-11-29 23:46:02 -0700
commite2e60f5ff9942902e97aebfdf234bb6a0f821dfe (patch)
treed2d9275197b00c6f998a60bda8e8a13b8d537127 /src/codegen/spirv/Section.zig
parent3dcea95ffe97ee93af50bf8906e53c7c7a7ec84e (diff)
downloadzig-e2e60f5ff9942902e97aebfdf234bb6a0f821dfe.tar.gz
zig-e2e60f5ff9942902e97aebfdf234bb6a0f821dfe.zip
std.heap.WasmAllocator: redo
The previous version had a fatal flaw: it did ensureCapacity(1) on the freelist when allocating, but I neglected to consider that you could free() twice in a row. Silly! This strategy allocates an intrusive freelist node with every allocation, big or small. It also does not have the problems with resize because in this case we can push the upper areas of freed stuff into the corresponding freelist.
Diffstat (limited to 'src/codegen/spirv/Section.zig')
0 files changed, 0 insertions, 0 deletions