LWN.net Logo

When in doubt, add another layer of indirection

When in doubt, add another layer of indirection

Posted Jun 9, 2011 7:43 UTC (Thu) by kevinm (guest, #69913)
In reply to: When in doubt, add another layer of indirection by sethml
Parent article: Object-oriented design patterns in the kernel, part 1

This seems like a reasonable idea, although the hit to readability and simplicity is such that you'd only want to do it in places where it would make a real memory difference.

Why not try it and see?

(By the way, it'd be 48 bits that you'd save replacing a 64 bit pointer with a 16 bit index).


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds