mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-01 20:36:37 -05:00
checkpoint
This commit is contained in:
parent
fa851eda3a
commit
7d9796b592
1 changed files with 22 additions and 0 deletions
22
tests/TEST_mmap
Executable file
22
tests/TEST_mmap
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
import mmap
|
||||
import resource
|
||||
|
||||
(fd,filepath) = tempfile.mkstemp(dir=sys.argv[1])
|
||||
|
||||
os.ftruncate(fd,resource.getpagesize())
|
||||
|
||||
data = mmap.mmap(fileno=fd,
|
||||
length=resource.getpagesize(),
|
||||
flags=mmap.MAP_PRIVATE)
|
||||
|
||||
data = mmap.mmap(fileno=fd,
|
||||
length=resource.getpagesize(),
|
||||
flags=mmap.MAP_SHARED)
|
||||
|
||||
os.unlink(filepath)
|
||||
os.close(fd)
|
||||
Loading…
Add table
Add a link
Reference in a new issue