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
263f15a5
Unverified
Commit
263f15a5
authored
Oct 27, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Regionlist overhaul: Shrink struct regl
parent
8672597b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
fellow_regionlist.h
src/fellow_regionlist.h
+5
-5
No files found.
src/fellow_regionlist.h
View file @
263f15a5
...
...
@@ -45,7 +45,7 @@
struct
regl
{
unsigned
magic
;
#define REGL_MAGIC 0xe946b3c2
u
nsigned
n
,
space
;
u
int16_t
n
,
space
;
struct
buddy_ptr_page
alloc
;
VSTAILQ_ENTRY
(
regl
)
list
;
struct
buddy_off_extent
arr
[];
...
...
@@ -150,8 +150,8 @@ regl_alloc_bits(buddy_t *membuddy, const uint8_t bits, int8_t cram,
r
->
magic
=
REGL_MAGIC
;
b
=
sz
/
sizeof
*
r
->
arr
;
assert
(
b
<=
UINT_MAX
);
r
->
space
=
(
unsigned
)
b
;
assert
(
b
<=
UINT
16
_MAX
);
r
->
space
=
(
typeof
(
r
->
space
)
)
b
;
r
->
alloc
=
alloc
;
return
(
r
);
}
...
...
@@ -222,7 +222,7 @@ regionlist_add(struct regionlist *rl,
const
struct
buddy_off_extent
*
regs
,
unsigned
n
)
{
struct
regl
*
regl
;
u
nsigned
av
,
nn
;
u
int16_t
av
,
nn
;
CHECK_OBJ_NOTNULL
(
rl
,
REGIONLIST_MAGIC
);
regl
=
VSTAILQ_LAST
(
&
rl
->
head
,
regl
,
list
);
...
...
@@ -240,7 +240,7 @@ regionlist_add(struct regionlist *rl,
if
(
av
<
n
)
nn
=
av
;
else
nn
=
n
;
nn
=
(
typeof
(
nn
))
n
;
memcpy
(
&
regl
->
arr
[
regl
->
n
],
regs
,
nn
*
sizeof
*
regs
);
regl
->
n
+=
nn
;
...
...
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