Settings

Theme

Ask HN: Do programmers view memory as pages?

3 points by shivajikobardan 3 months ago · 3 comments · 1 min read


Since paging is the widely used technique in Memory Management. Do programmer's view memory as a set of pages? This sounds very weird to me lol. For example: I have never ever had found a java dev who thinks in pages for memory. Segmentation seem more useful for programmer's view. But segmentation in Memory Management was not used anymore and was obsolete.

Is there something like a precursor to paging? something like WAF that stands ahead of paging to abstract the view to software engineer?

JohnFen 3 months ago

It depends on the system. If I'm programming on a system that uses a segmented memory architecture of some sort (including bank switching), then I view memory as a set of pages. Otherwise, I don't.

I don't have some sort of "general" view on this. It entirely depends on the architecture of the system I happen to be working with.

stop50 3 months ago

Pages exist because to reduce the amount of managment and for easier alignment the total space was segmented into pages. Before that prigrams accessed the ram as if all of it was theirs. After the mmu was introduced it was changed into pages we know today.

checker659 3 months ago

The concept of pages is baked deep into the memory hierarchy (cache, TLBs). What exactly do you mean by precursor? I imagine you're thinking of pages as an abstraction over something more fundamental (?).

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection