| ... | @@ -189,7 +189,7 @@ pub fn GeneralPurposeAllocator(comptime config: Config) type { | ... | @@ -189,7 +189,7 @@ pub fn GeneralPurposeAllocator(comptime config: Config) type { |
| 189 | std.debug.dumpStackTrace(stack_trace); | 189 | std.debug.dumpStackTrace(stack_trace); |
| 190 | } | 190 | } |
| 191 | }; | 191 | }; |
| 192 | const LargeAllocTable = std.HashMapUnmanaged(usize, LargeAlloc, hash_addr, eql_addr, false); | 192 | const LargeAllocTable = std.AutoHashMapUnmanaged(usize, LargeAlloc); |
| 193 | | 193 | |
| 194 | // Bucket: In memory, in order: | 194 | // Bucket: In memory, in order: |
| 195 | // * BucketHeader | 195 | // * BucketHeader |
| ... | @@ -609,17 +609,6 @@ const TraceKind = enum { | ... | @@ -609,17 +609,6 @@ const TraceKind = enum { |
| 609 | free, | 609 | free, |
| 610 | }; | 610 | }; |
| 611 | | 611 | |
| 612 | fn hash_addr(addr: usize) u32 { | | |
| 613 | if (@sizeOf(usize) == @sizeOf(u32)) | | |
| 614 | return addr; | | |
| 615 | comptime assert(@sizeOf(usize) == 8); | | |
| 616 | return @intCast(u32, addr >> 32) ^ @truncate(u32, addr); | | |
| 617 | } | | |
| 618 | | | |
| 619 | fn eql_addr(a: usize, b: usize) bool { | | |
| 620 | return a == b; | | |
| 621 | } | | |
| 622 | | | |
| 623 | const test_config = Config{}; | 612 | const test_config = Config{}; |
| 624 | | 613 | |
| 625 | test "small allocations - free in same order" { | 614 | test "small allocations - free in same order" { |