File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 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;
9090const Allocator = std .mem .Allocator ;
9191const StackTrace = std .builtin .StackTrace ;
9292
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+ };
98103
99104const Log2USize = std .math .Log2Int (usize );
100105
You can’t perform that action at this time.
0 commit comments