|
|
Log in / Subscribe / Register

_refcount

_refcount

Posted Oct 8, 2021 20:02 UTC (Fri) by corbet (editor, #1)
In reply to: Pulling slabs out of struct page by Cyberax
Parent article: Pulling slabs out of struct page

For struct slab, it has to be in the same place as with struct page. As for why its location in struct page, that's probably an outcome of years of history. But is there some special reason why _refcount should be at the beginning?


to post comments

_refcount

Posted Oct 8, 2021 23:53 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

I mean, typically you would want to have all the shared fields to come first in the structure. That's how inheritance is usually done in plain C.


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