LWN.net Logo

Why struct meta_page?

Why struct meta_page?

Posted Aug 6, 2007 17:26 UTC (Mon) by i3839 (guest, #31386)
In reply to: Why struct meta_page? by i3839
Parent article: Controlling memory use in containers

If the above method of reusing the current lru isn't possible, an alternative would be to keep around a shadow array of struct meta_page, assuming currently an array of struct pages is used starting at a known location. Then you can calculate the index of the other structure from the memory address of either structure, also making those two pointers redundant, with the added benefit that struct page size isn't increased and the memory is only allocated when containers are used.


(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