File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -90,11 +90,16 @@ const mem = std.mem;
90
90
const Allocator = std .mem .Allocator ;
91
91
const StackTrace = std .builtin .StackTrace ;
92
92
93
- const default_page_size : usize = @max (std .heap .page_size_max , switch (builtin .os .tag ) {
94
- .windows = > 64 * 1024 , // Makes `std.heap.PageAllocator` take the happy path.
95
- .wasi = > 64 * 1024 , // Max alignment supported by `std.heap.WasmAllocator`.
96
- else = > 128 * 1024 , // Avoids too many active mappings when `page_size_max` is low.
97
- });
93
+ const default_page_size : usize = switch (builtin .os .tag ) {
94
+ // Makes `std.heap.PageAllocator` take the happy path.
95
+ .windows = > 64 * 1024 ,
96
+ else = > switch (builtin .cpu .arch ) {
97
+ // Max alignment supported by `std.heap.WasmAllocator`.
98
+ .wasm32 , .wasm64 = > 64 * 1024 ,
99
+ // Avoids too many active mappings when `page_size_max` is low.
100
+ else = > @max (std .heap .page_size_max , 128 * 1024 ),
101
+ },
102
+ };
98
103
99
104
const Log2USize = std .math .Log2Int (usize );
100
105
You can’t perform that action at this time.
0 commit comments