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
ddf27c11
Unverified
Commit
ddf27c11
authored
Oct 27, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Regionlist overhaul: Refactor regionlist init
parent
a269fb42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
fellow_regionlist.h
src/fellow_regionlist.h
+14
-6
No files found.
src/fellow_regionlist.h
View file @
ddf27c11
...
...
@@ -132,18 +132,13 @@ regl_cram(const uint8_t bits, int8_t cram)
}
static
struct
regl
*
regl_
alloc_bits
(
buddy_t
*
membuddy
,
const
uint8_t
bits
,
int8_t
cram
,
regl_
init
(
buddy_t
*
membuddy
,
struct
buddy_ptr_page
alloc
,
struct
regionlist
**
rlp
)
{
struct
buddy_ptr_page
alloc
;
struct
regionlist
*
rl
;
struct
regl
*
r
;
size_t
sz
,
b
;
alloc
=
buddy_alloc1_ptr_page_wait
(
membuddy
,
FEP_MEM_FREE
,
bits
,
regl_cram
(
bits
,
cram
));
AN
(
alloc
.
ptr
);
sz
=
(
size_t
)
1
<<
alloc
.
bits
;
assert
(
sz
>=
(
sizeof
*
r
+
sizeof
*
rl
));
...
...
@@ -173,6 +168,19 @@ regl_alloc_bits(buddy_t *membuddy, const uint8_t bits, int8_t cram,
return
(
r
);
}
static
struct
regl
*
regl_alloc_bits
(
buddy_t
*
membuddy
,
const
uint8_t
bits
,
int8_t
cram
,
struct
regionlist
**
rlp
)
{
struct
buddy_ptr_page
alloc
;
alloc
=
buddy_alloc1_ptr_page_wait
(
membuddy
,
FEP_MEM_FREE
,
bits
,
regl_cram
(
bits
,
cram
));
AN
(
alloc
.
ptr
);
return
(
regl_init
(
membuddy
,
alloc
,
rlp
));
}
#ifdef DEBUG
static
const
int8_t
regl_bits
=
12
;
#else
...
...
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