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
95ba1017
Unverified
Commit
95ba1017
authored
Jan 19, 2024
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fellow_cache: Trim the FCO also after embedding
parent
07c3753c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
fellow_cache.c
src/fellow_cache.c
+5
-4
No files found.
src/fellow_cache.c
View file @
95ba1017
...
...
@@ -2991,8 +2991,6 @@ fellow_cache_obj_trim(const struct fellow_cache *fc,
CHECK_OBJ_NOTNULL
(
fco
,
FELLOW_CACHE_OBJ_MAGIC
);
// no trim if fdo is embedded - XXX cleaner way?
if
(
FCO_FCS
(
fco
)
->
alloc
.
ptr
==
NULL
)
return
;
assert
(
FCO_FDO
(
fco
)
==
FCO_FCS
(
fco
)
->
alloc
.
ptr
);
fcsl
=
&
fco
->
fcsl_embed
;
...
...
@@ -5405,7 +5403,7 @@ struct objcore **ocp, uintptr_t priv2, unsigned crit)
unsigned
oref
=
0
;
const
char
*
err
;
char
*
ptr
;
size_t
spc
,
sz
;
size_t
spc
,
sz
,
nsz
;
int
r
;
CHECK_OBJ_NOTNULL
(
fc
,
FELLOW_CACHE_MAGIC
);
...
...
@@ -5554,6 +5552,7 @@ struct objcore **ocp, uintptr_t priv2, unsigned crit)
assert
(
sz
<=
fco
->
fco_mem
.
size
);
ptr
=
(
char
*
)
fco
+
sz
;
assert
(
PAOK
(
ptr
));
nsz
=
sz
;
spc
=
fco
->
fco_mem
.
size
-
sz
;
...
...
@@ -5565,10 +5564,13 @@ struct objcore **ocp, uintptr_t priv2, unsigned crit)
fdo
=
fcs
->
u
.
fco_fdo
=
(
void
*
)
ptr
;
AN
(
buddy_return_ptr_extent
(
rets
,
&
fcs
->
alloc
));
nsz
+=
sz
;
}
else
fdo
=
fellow_disk_obj_trim
(
fc
,
fcs
);
buddy_trim1_ptr_extent
(
fc
->
membuddy
,
&
fco
->
fco_mem
,
nsz
);
fdsl
=
fellow_disk_obj_fdsl
(
fdo
);
assert
(
PAOK
(
fdsl
));
CHECK_OBJ_NOTNULL
(
fdsl
,
FELLOW_DISK_SEGLIST_MAGIC
);
...
...
@@ -5609,7 +5611,6 @@ struct objcore **ocp, uintptr_t priv2, unsigned crit)
if
(
dowry
.
bits
)
AN
(
buddy_return_ptr_page
(
rets
,
&
dowry
));
fellow_cache_obj_trim
(
fc
,
fco
);
buddy_return
(
rets
);
return
(
FCR_OK
(
fco
));
err:
...
...
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