Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
ac0353b1
Commit
ac0353b1
authored
11 years ago
by
Arne Goedeke
Browse files
Options
Downloads
Patches
Plain Diff
block_allocator: removed some INLINE and warnings for unused parameters
parent
e4786003
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/block_allocator.c
+10
-6
10 additions, 6 deletions
src/block_allocator.c
with
10 additions
and
6 deletions
src/block_allocator.c
+
10
−
6
View file @
ac0353b1
...
...
@@ -413,7 +413,7 @@ static INLINE int bv_get(struct bitvector * bv, size_t n) {
return
!!
(
bv
->
v
[
c
]
&
(
BV_ONE
<<
bit
));
}
static
INLINE
size_t
bv_ctz
(
struct
bitvector
*
bv
,
size_t
n
)
{
static
size_t
bv_ctz
(
struct
bitvector
*
bv
,
size_t
n
)
{
size_t
bit
=
n
%
BV_LENGTH
;
size_t
c
=
n
/
BV_LENGTH
;
bv_int_t
*
_v
=
bv
->
v
+
c
;
...
...
@@ -436,7 +436,7 @@ RET:
}
#ifdef BA_DEBUG
static
INLINE
void
bv_print
(
struct
bitvector
*
bv
)
{
static
void
bv_print
(
struct
bitvector
*
bv
)
{
size_t
i
;
for
(
i
=
0
;
i
<
bv
->
length
;
i
++
)
{
fprintf
(
stderr
,
"%d"
,
bv_get
(
bv
,
i
));
...
...
@@ -504,25 +504,29 @@ struct ba_block_header * ba_sort_list(const struct ba_page * p,
return
b
;
}
static
INLINE
void
ba_list_defined
(
struct
block_allocator
*
a
,
struct
ba_block_header
*
b
)
{
#ifdef USE_VALGRIND
static
void
ba_list_defined
(
struct
block_allocator
*
a
,
struct
ba_block_header
*
b
)
{
while
(
b
&&
b
!=
BA_ONE
)
{
PIKE_MEMPOOL_ALLOC
(
a
,
b
,
a
->
l
.
block_size
);
PIKE_MEM_RW_RANGE
(
b
,
sizeof
(
struct
ba_block_header
));
b
=
b
->
next
;
}
#endif
}
#else
#define ba_list_defined(a, b)
#endif
static
INLINE
void
ba_list_undefined
(
struct
block_allocator
*
a
,
struct
ba_block_header
*
b
)
{
#ifdef USE_VALGRIND
static
void
ba_list_undefined
(
struct
block_allocator
*
a
,
struct
ba_block_header
*
b
)
{
while
(
b
&&
b
!=
BA_ONE
)
{
struct
ba_block_header
*
next
=
b
->
next
;
PIKE_MEMPOOL_FREE
(
a
,
b
,
a
->
l
.
block_size
);
b
=
next
;
}
#endif
}
#else
#define ba_list_undefined(a, b)
#endif
/*
* This function allows iteration over all allocated blocks. Some things are not allowed:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment