Re: [RFC]Routes are stored as a linked list
Roy Marples
Tue Mar 05 00:46:08 2019
On 04/03/2019 21:43, Roy Marples wrote:
Lowering memory usage more we can do this - move if_initrt to the top of
rt_build. This is tricky as from memory some parts of dhcpcd rely on it
being there outside of route building. We'll need to double check and
fix these places.
Once that's done we can then dispose of kroutes at the end of rt_build.
If that works, kroutes can be removed from the global context.
But that's for another day.
Well, I was wondering what really needs kroutes around and it turns out
I think it can be removed safely.
I've created a new branch, rbtree-memory with the prior patch in and the
above done.
It seems to work and valgrind doesn't report any leaks.
How is the memory usage looking now with your million routes?
If it's lower, could you add -DRT_FREE_ROUTE_TABLE to your CPPFLAGS,
clean and compile, and see how that then affects matters?
Roy
Archive administrator: postmaster@marples.name