Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
a189bd99
Commit
a189bd99
authored
Mar 15, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
97d98934
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
wcfs/mm.pyx
wcfs/mm.pyx
+5
-1
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+1
-4
No files found.
wcfs/mm.pyx
View file @
a189bd99
...
...
@@ -39,8 +39,12 @@ cpdef enum:
#
# mem start must be page-aligned.
def
incore
(
const
unsigned
char
[::
1
]
mem
not
None
)
->
bytearray
:
cdef
const
void
*
addr
=
&
mem
[
0
]
cdef
size_t
size
=
mem
.
shape
[
0
]
if
size
==
0
:
# XXX ok? or pass addr, 0 to mincore?
# XXX if size==0 &mem[0] raises out-of-bounds
return
bytearray
()
cdef
const
void
*
addr
=
&
mem
[
0
]
# size in pages; rounded up
cdef
size_t
pgsize
=
(
size
+
(
PAGE_SIZE
-
1
))
//
PAGE_SIZE
...
...
wcfs/wcfs_test.py
View file @
a189bd99
...
...
@@ -397,7 +397,7 @@ def test_wcfs():
t
.
wcsync
()
# f @head
f
.
assertCache
([
1
,
1
,
0
,
0
])
f
.
assertCache
([
1
,
1
,
0
,
0
])
# XXX fails here (.size changed)
f
.
assertData
([
b''
,
b''
,
s1
+
b'ld'
,
s2
],
mtime
=
t
.
head
)
# f @tcommit1
...
...
@@ -406,9 +406,6 @@ def test_wcfs():
f1
.
assertData
([
b''
,
b''
,
s
])
# XXX + mtime=tcommit1?
# TODO pagecache state after loading (via mincore)
# TODO pagecahce state after .size change
def
test_wcfs_invproto
():
# XXX
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment