pmem / pynvm

Python bindings for the PMDK. Non-volatile memory for Python.
http://pynvm.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
13 stars 10 forks source link

Wrong "getting started" example for pmem #22

Open alexbarcelo opened 5 years ago

alexbarcelo commented 5 years ago

The current examples in https://pynvm.readthedocs.io/en/v0.3.1/getting_started.html regarding libpmem library use a call pmem.map which doesn't seem to exist.

I suppose that it should be pmem.map_file, which seems to be similar (https://pynvm.readthedocs.io/en/v0.3.1/pmem.html#nvm.pmem.map_file). However, the documentation for map_file only explains three of the four parameters, and they are all needed (that is what I see in Python 2.7 and pynvm==0.3.1, which is my current environment).

I am unable to execute the tests nor I fully understand the meaning of the mode parameter. I don't know if this is only a documentation problem or the call is expected to have optional parameters.

alexbarcelo commented 5 years ago

I just saw that map_file call expects a name of file, not a fallocate result, so I am more confused. Does this superseed the previous approach fallocate + map? Or is it completely different?