User: Password:
|
|
Subscribe / Log in / New account

Persistent memory

Persistent memory

Posted Mar 31, 2014 17:53 UTC (Mon) by dontstayhome (subscriber, #54412)
In reply to: Persistent memory by luto
Parent article: Persistent memory

Isn't the same effect achieved by not allocating that page/region at all? Why is it better to allocate it as PROT_NONE?

I guess maybe if you didn't explicitly allocate surrounding guard regions, your next mmap could be placed adjacent to your previous one (if you don't explicitly specify MAP_FIXED)? Does the kernel actually do this in practice?


(Log in to post comments)

Persistent memory

Posted Mar 31, 2014 19:14 UTC (Mon) by luto (subscriber, #39314) [Link]

The kernel seems to stick them all right next to each other if I don't explicitly add a PROT_NONE region in the way. And, since MAP_FIXED overwrites things, I can't just guess a desired address and try it with MAP_FIXED, since I'll crash if I guess badly.

The upshot is that the an improved MAP_FIXED flag would actually improve my use case a bit.

Maybe we should have MAP_WANT_GUARD_PAGES, too.


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