Does std.Io.net.HostName.connect() allocate?

Hi,

I was looking at this http client demo code, which is linked to by the last devlog from 2025, discussing async DNS resolution.

The comments below the demo code list “No heap allocation” as one of the upsides of the new Io interface, but when i run the demo code with verbose_log enabled on the DebugAllocator, i get the following output, which looks like the code actually does alllocate:

info(DebugAllocator): small alloc 194 bytes at 0x7f5964660000
info(DebugAllocator): small alloc 122 bytes at 0x7f5963360000
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660100
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660200
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660300
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660400
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660500
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660600
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660700
info(DebugAllocator): small free 192 bytes at u8@7f5964660700
info(DebugAllocator): small free 192 bytes at u8@7f5964660400
info(DebugAllocator): small free 192 bytes at u8@7f5964660100
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660800
info(DebugAllocator): small free 192 bytes at u8@7f5964660500
info(DebugAllocator): small free 192 bytes at u8@7f5964660300
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660900
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660a00
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660b00
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660c00
info(DebugAllocator): small free 192 bytes at u8@7f5964660c00
info(DebugAllocator): small free 192 bytes at u8@7f5964660200
info(DebugAllocator): small free 192 bytes at u8@7f5964660600
info(DebugAllocator): small free 192 bytes at u8@7f5964660800
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660d00
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660e00
info(DebugAllocator): small alloc 192 bytes at 0x7f5964660f00
info(DebugAllocator): small alloc 192 bytes at 0x7f5964661000
info(DebugAllocator): small free 192 bytes at u8@7f5964661000
info(DebugAllocator): small free 192 bytes at u8@7f5964660a00
info(DebugAllocator): small free 192 bytes at u8@7f5964660b00
info(DebugAllocator): small free 192 bytes at u8@7f5964660900
info(DebugAllocator): small free 192 bytes at u8@7f5964660f00
info(DebugAllocator): small free 192 bytes at u8@7f5964660d00
info(DebugAllocator): small free 192 bytes at u8@7f5964660e00
info(DebugAllocator): small free 122 bytes at u8@7f5963360000
info(DebugAllocator): small free 194 bytes at u8@7f5964660000
info(DebugAllocator): small alloc 9446 bytes at 0x7f595d1a0000
info: received 200 OK
info(DebugAllocator): small free 9446 bytes at u8@7f595d1a0000

Am i misunderstanding the verbose logging output from the DebugAllocator ? Is it still not allocating on the heap even when it logs an allocation ?

The small allocations are tasks/futures, which it uses to connect to all the IPs at the same time, so while the DNS resolver probably doesn’t allocate memory, the further connecting does.