mirror of
https://github.com/ziglang/zig.git
synced 2026-02-19 07:48:31 +00:00
Work around __heap_base for now
This commit is contained in:
parent
ba38a6d122
commit
f32555aa08
@ -257,6 +257,9 @@ test "" {
|
||||
}
|
||||
|
||||
const WasmPageAllocator = struct {
|
||||
// TODO: figure out why __heap_base cannot be found
|
||||
var heap_base_wannabe: [256]u8 = undefined;
|
||||
|
||||
const FreeBlock = struct {
|
||||
offset: usize = 0,
|
||||
packed_data: std.PackedIntSlice(u1) = std.PackedIntSlice(u1).init(&[_]u8{}, 0),
|
||||
@ -349,7 +352,8 @@ const WasmPageAllocator = struct {
|
||||
|
||||
if (free_end > free_start) {
|
||||
if (conventional.totalPages() == 0) {
|
||||
conventional.initData(__heap_base[0..@intCast(usize, @"llvm.wasm.memory.size.i32"(0) * std.mem.page_size)]);
|
||||
//conventional.initData(__heap_base[0..@intCast(usize, @"llvm.wasm.memory.size.i32"(0) * std.mem.page_size)]);
|
||||
conventional.initData(heap_base_wannabe[0..]);
|
||||
}
|
||||
|
||||
if (free_start < conventional.totalPages()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user