anonymous map

25 views
Skip to first unread message

Yue Li

unread,
Feb 18, 2018, 6:24:16 PM2/18/18
to pmem
Hi, 

I'm just wondering if anonymous map can be used with pmdk? Or we have to use file-backed mapping?

Best, 

Yue

Piotr Balcer

unread,
Feb 19, 2018, 6:33:48 AM2/19/18
to pmem
Hi Yue,
To what end? The entire purpose of the library is to allow applications to resume from previously created persistent state.

If you want to use RAM backed pages, just use a pool located in tmpfs. This will enable you to create/debug applications in the absence of dax-enabled file system and real NVDIMMs.
Having said that, I recommend setting up an emulated pmem device with a DAX file system, here's a blog post describing how to do it:
http://pmem.io/2016/02/22/pm-emulation.html

Piotr

Niall Douglas

unread,
Feb 20, 2018, 4:51:57 AM2/20/18
to pmem
If you're looking for throwaway memory which uses the device rather than using RAM, a temporary inode create with O_TMPFILE will do.

Niall
Reply all
Reply to author
Forward
0 new messages