Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slash
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
slash
Commits
eb6bd99e
Unverified
Commit
eb6bd99e
authored
Nov 26, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve coverage and fix an off-by-one
parent
65de18d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
fellow_cache.c
src/fellow_cache.c
+8
-7
No files found.
src/fellow_cache.c
View file @
eb6bd99e
...
@@ -2045,7 +2045,7 @@ fellow_busy_obj_alloc(struct fellow_cache *fc,
...
@@ -2045,7 +2045,7 @@ fellow_busy_obj_alloc(struct fellow_cache *fc,
// DBG("roundup fdo + fdsl dsk_sz %zu", dsk_sz);
// DBG("roundup fdo + fdsl dsk_sz %zu", dsk_sz);
assert
(
dsk_sz
>
asz
);
assert
(
dsk_sz
>
=
asz
);
sz
=
((
dsk_sz
-
asz
)
+
sizeof
(
struct
fellow_disk_seg
))
sz
=
((
dsk_sz
-
asz
)
+
sizeof
(
struct
fellow_disk_seg
))
/
sizeof
(
struct
fellow_disk_seg
);
/
sizeof
(
struct
fellow_disk_seg
);
assert
(
sz
<=
FELLOW_DISK_SEGLIST_MAX_SEGS
);
assert
(
sz
<=
FELLOW_DISK_SEGLIST_MAX_SEGS
);
...
@@ -5963,12 +5963,13 @@ t_cache(unsigned chksum)
...
@@ -5963,12 +5963,13 @@ t_cache(unsigned chksum)
t_lcb
(
fc
);
t_lcb
(
fc
);
// === empty obj
// === empty obj, loop sizes
fbo
=
fellow_busy_obj_alloc
(
fc
,
&
fco
,
&
priv2
,
1234
).
r
.
ptr
;
for
(
sz
=
0
;
sz
<
4096
;
sz
+=
8
)
{
CHECK_OBJ_NOTNULL
(
fbo
,
FELLOW_BUSY_MAGIC
);
fbo
=
fellow_busy_obj_alloc
(
fc
,
&
fco
,
&
priv2
,
sz
).
r
.
ptr
;
CHECK_OBJ_NOTNULL
(
fbo
,
FELLOW_BUSY_MAGIC
);
test_bocdone
(
fbo
,
TRUST_ME
(
hash
),
1
);
test_bocdone
(
fbo
,
TRUST_ME
(
hash
),
1
);
fellow_cache_obj_deref
(
fc
,
fco
);
fellow_cache_obj_deref
(
fc
,
fco
);
}
// === max out region alloc
// === max out region alloc
fbo
=
fellow_busy_obj_alloc
(
fc
,
&
fco
,
&
priv2
,
1234
).
r
.
ptr
;
fbo
=
fellow_busy_obj_alloc
(
fc
,
&
fco
,
&
priv2
,
1234
).
r
.
ptr
;
...
...
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