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
4dbf0329
Commit
4dbf0329
authored
Jul 10, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
24826389
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
bigfile/tests/test_virtmem.c
bigfile/tests/test_virtmem.c
+6
-10
No files found.
bigfile/tests/test_virtmem.c
View file @
4dbf0329
...
...
@@ -218,7 +218,7 @@ int M(VMA *vma, pgoff_t idx) { return bitmap_test_bit(vma->page_ismappedv, idx)
ok1((page)->refcnt == (pgrefcnt)); \
} while (0)
/* check that fileh->pagemap[pg
fos
set] is empty */
/* check that fileh->pagemap[pg
off
set] is empty */
#define __CHECK_NOPAGE(fileh, pgoffset) do { \
ok1(!pagemap_get(&(fileh)->pagemap, (pgoffset))); \
} while (0)
...
...
@@ -259,16 +259,14 @@ void _assert_pagev(const char *subj, Page **vok, int nok, Page **pagev, int n,
/* _check_mru checks that ram has MRU pages as specified by pagev */
void
_check_mru
(
RAM
*
ram
,
Page
*
mruok
[],
int
nok
,
const
char
*
func
,
const
char
*
file
,
int
line
)
{
Page
**
mruv
=
NULL
,
*
page
;
Page
**
mruv
=
NULL
;
int
n
=
0
;
struct
list_head
*
h
;
// collect mruv
list_for_each_backwardly
(
h
,
&
ram
->
lru_list
)
{
page
=
list_entry
(
h
,
typeof
(
*
page
),
lru
);
n
++
;
mruv
=
realloc
(
mruv
,
n
*
sizeof
(
*
mruv
));
mruv
[
n
-
1
]
=
page
;
mruv
[
n
++
]
=
list_entry
(
h
,
Page
,
lru
)
;
}
_assert_pagev
(
"check_mru"
,
mruok
,
nok
,
mruv
,
n
,
func
,
file
,
line
);
...
...
@@ -283,18 +281,16 @@ void _check_mru(RAM *ram, Page *mruok[], int nok, const char *func, const char *
/* _check_dirty checks that fileh has dirty pages as specified.
* the orderof dirty list traversal is to go through most recently dirtied pages first */
* the order
of dirty list traversal is to go through most recently dirtied pages first */
void
_check_dirty
(
BigFileH
*
fileh
,
Page
*
dirtyok
[],
int
nok
,
const
char
*
func
,
const
char
*
file
,
int
line
)
{
Page
**
dirtyv
=
NULL
,
*
page
;
Page
**
dirtyv
=
NULL
;
int
n
=
0
;
struct
list_head
*
h
;
// collect dirtyv
list_for_each_backwardly
(
h
,
&
fileh
->
dirty_pages
)
{
page
=
list_entry
(
h
,
typeof
(
*
page
),
in_dirty
);
n
++
;
dirtyv
=
realloc
(
dirtyv
,
n
*
sizeof
(
*
dirtyv
));
dirtyv
[
n
-
1
]
=
page
;
dirtyv
[
n
++
]
=
list_entry
(
h
,
Page
,
in_dirty
)
;
}
_assert_pagev
(
"check_dirty"
,
dirtyok
,
nok
,
dirtyv
,
n
,
func
,
file
,
line
);
...
...
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