|
|
Subscribe / Log in / New account

Clarifying memory management with page folios

Clarifying memory management with page folios

Posted Mar 19, 2021 16:57 UTC (Fri) by willy (subscriber, #9762)
In reply to: Clarifying memory management with page folios by clugstj
Parent article: Clarifying memory management with page folios

Are you suggesting calling it 'struct compound_page'?


to post comments

Clarifying memory management with page folios

Posted Mar 19, 2021 17:01 UTC (Fri) by clugstj (subscriber, #4020) [Link] (4 responses)

Why not?

Clarifying memory management with page folios

Posted Mar 19, 2021 17:02 UTC (Fri) by willy (subscriber, #9762) [Link] (3 responses)

Because that's an extra 9 characters over 'struct page'. Short is generally better for something that's common.

Clarifying memory management with page folios

Posted Mar 19, 2021 17:16 UTC (Fri) by clugstj (subscriber, #4020) [Link] (2 responses)

Well then, I must respectfully disagree. IMO, the obvious name should not be ignored because it is "too long". This is not the 1960s, we can afford clarity of naming in code.

Clarifying memory management with page folios

Posted Mar 22, 2021 23:48 UTC (Mon) by milesrout (subscriber, #126894) [Link] (1 responses)

It doesn't matter one bit which year it is. This "oh my god it's 2021 come on people" attitude is really silly. Long names are inconvenient to read and to write, and encourage code to be split over many lines to fit regardless of how many years it's been since Jesus was born.

Clarifying memory management with page folios

Posted Sep 16, 2021 8:10 UTC (Thu) by ncm (guest, #165) [Link]

Names need to be long enough to distinguish the thing named from other things it might otherwise have been and (if you exercise any foresight) also things it will not be.

How long that name needs to be depends on the scope of the names.

In C, lacking any mechanism for namespacing, a practical name *often* must be unpleasantly long. That is a fault of the language, not (usually) of the person choosing the name; although some people confuse names with specifications, and so invent stupidly long names.

"Compound_page" is not, in any universe, stupidly long for a C struct tag.


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