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
7200ef50
Unverified
Commit
7200ef50
authored
Jul 10, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor size estimate
parent
bef3d014
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
fellow_cache.c
src/fellow_cache.c
+12
-6
No files found.
src/fellow_cache.c
View file @
7200ef50
...
...
@@ -3591,14 +3591,20 @@ fellow_busy_obj_getspace(struct fellow_busy *fbo, size_t *sz, uint8_t **ptr)
fbo
->
sz_estimate
=
*
sz
;
fbo
->
sz_increment
=
*
sz
;
}
else
if
(
*
sz
+
fbo
->
sz_returned
>
fbo
->
sz_estimate
)
{
fbo
->
grown
++
;
delta
=
*
sz
+
fbo
->
sz_returned
-
fbo
->
sz_estimate
;
if
(
fbo
->
sz_increment
<
delta
)
fbo
->
sz_increment
=
delta
;
fbo
->
sz_estimate
+=
fbo
->
sz_increment
;
fbo
->
sz_increment
<<=
1
;
// XXX wip
fbo
->
grown
=
1
;
if
(
fbo
->
sz_estimate
>
fbo
->
fc
->
tune
->
objsize_max
)
{
fbo
->
sz_estimate
=
fbo
->
fc
->
tune
->
objsize_max
;
fbo
->
sz_increment
=
0
;
}
else
if
(
fbo
->
sz_increment
<
delta
)
{
fbo
->
sz_estimate
+=
delta
;
fbo
->
sz_increment
=
delta
;
}
else
{
fbo
->
sz_estimate
+=
fbo
->
sz_increment
;
fbo
->
sz_increment
<<=
1
;
}
}
fcs
=
fbo
->
body_seg
;
...
...
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