| ... | ... | @@ -317,7 +317,10 @@ pub fn GeneralPurposeAllocator(comptime config: Config) type { |
| 317 | 317 | if (is_used) { |
| 318 | 318 | const slot_index = @intCast(SlotIndex, used_bits_byte * 8 + bit_index); |
| 319 | 319 | const stack_trace = bucketStackTrace(bucket, size_class, slot_index, .alloc); |
| 320 | | log.err("Memory leak detected: {s}", .{stack_trace}); |
| 320 | const addr = bucket.page + slot_index * size_class; |
| 321 | log.err("memory address 0x{x} leaked: {s}", .{ |
| 322 | @ptrToInt(addr), stack_trace, |
| 323 | }); |
| 321 | 324 | leaks = true; |
| 322 | 325 | } |
| 323 | 326 | if (bit_index == math.maxInt(u3)) |
| ... | ... | @@ -345,7 +348,9 @@ pub fn GeneralPurposeAllocator(comptime config: Config) type { |
| 345 | 348 | } |
| 346 | 349 | var it = self.large_allocations.iterator(); |
| 347 | 350 | while (it.next()) |large_alloc| { |
| 348 | | log.err("Memory leak detected: {s}", .{large_alloc.value.getStackTrace()}); |
| 351 | log.err("memory address 0x{x} leaked: {s}", .{ |
| 352 | @ptrToInt(large_alloc.value.bytes.ptr), large_alloc.value.getStackTrace(), |
| 353 | }); |
| 349 | 354 | leaks = true; |
| 350 | 355 | } |
| 351 | 356 | return leaks; |