Subject: Re: Problems with outgoing routing of UDP packets
To: Erik E. Fair <fair@netbsd.org>
From: Tom Ivar Helbekkmo <tih@eunetnorge.no>
List: tech-net
Date: 04/23/2004 09:33:24
"Erik E. Fair" <fair@netbsd.org> writes:

> So, that means when the cache entry is flushed, the RAM can be released?

Not really -- you'd need to do reference counting, then.  I'd think
that the routing table is sufficiently small, and, more importantly,
sufficiently constant in size, that not releasing memory once
allocated to it is a small price to pay for increased efficiency and
simplicity of implementation.

Of course, such an implementation could always be extended with a
mechanism to garbage collect and release defunct nodes by inspecting
all sockets and invalidating cached references.  This is code that
would not need to be written initially, as long as it is made clear
that references into the routing table must be limited to specified
data structures that the future GC mechanism will inspect.

-tih
-- 
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway
www.eunet.no  T: +47-22092958 M: +47-93013940 F: +47-22092901