Get the latest tech news

Using less memory to look up IP addresses in Mess With DNS


Using less memory to look up IP addresses in Mess With DNS

A while back I set GOMEMLIMIT to 250MB to try to make sure the garbage collector ran if Mess With DNS used more than 250MB of memory, and I think this helped but it didn’t solve everything. It turns out that I’m not the only one who felt that net.IP was using an unnecessary amount of memory – in 2021 the folks at Tailscale released a new IP address library for Go which solves this and many other issues. It’s always such a great feeling when I think “hey, I don’t like this, there must be a better way” and then immediately discover that someone has already made the exact thing I want, thought about it a lot more than me, and implemented it much better than I would have.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of DNS

DNS

Photo of Memory

Memory

Photo of IP addresses

IP addresses

Related news:

News photo

On its 20th anniversary, GTA San Andreas veteran shares the open-world was originally split into three maps: "Memory was very tight on the PS2"

News photo

An Alternative to Rewriting Memory-Unsafe Code in Rust: the 'Safe C++ Extensions' Proposal

News photo

Making sense of the Google Chrome and ad blocker extensions mess