Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0a709791
Commit
0a709791
authored
Dec 18, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: buf_buddy_free_low(): Examine the state bits inside the
block before traversing the free list.
parent
2eb7e547
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
buf/buf0buddy.c
buf/buf0buddy.c
+10
-0
No files found.
buf/buf0buddy.c
View file @
0a709791
...
@@ -413,6 +413,15 @@ recombine:
...
@@ -413,6 +413,15 @@ recombine:
buddy
=
(
buf_page_t
*
)
buf_buddy_get
(((
byte
*
)
buf
),
BUF_BUDDY_LOW
<<
i
);
buddy
=
(
buf_page_t
*
)
buf_buddy_get
(((
byte
*
)
buf
),
BUF_BUDDY_LOW
<<
i
);
if
(
buddy
->
state
!=
BUF_BLOCK_ZIP_FREE
)
{
goto
buddy_nonfree
;
}
/* The field buddy->state can only be trusted for free blocks.
If buddy->state == BUF_BLOCK_ZIP_FREE, the block is free if
it is in the free list. */
for
(
bpage
=
UT_LIST_GET_FIRST
(
buf_pool
->
zip_free
[
i
]);
for
(
bpage
=
UT_LIST_GET_FIRST
(
buf_pool
->
zip_free
[
i
]);
bpage
;
bpage
=
UT_LIST_GET_NEXT
(
list
,
bpage
))
{
bpage
;
bpage
=
UT_LIST_GET_NEXT
(
list
,
bpage
))
{
ut_ad
(
buf_page_get_state
(
bpage
)
==
BUF_BLOCK_ZIP_FREE
);
ut_ad
(
buf_page_get_state
(
bpage
)
==
BUF_BLOCK_ZIP_FREE
);
...
@@ -436,6 +445,7 @@ buddy_free:
...
@@ -436,6 +445,7 @@ buddy_free:
ut_a
(
bpage
!=
buf
);
ut_a
(
bpage
!=
buf
);
}
}
buddy_nonfree:
/* The buddy is not free. Is there a free block of this size? */
/* The buddy is not free. Is there a free block of this size? */
bpage
=
UT_LIST_GET_FIRST
(
buf_pool
->
zip_free
[
i
]);
bpage
=
UT_LIST_GET_FIRST
(
buf_pool
->
zip_free
[
i
]);
...
...
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