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
86ccc887
Commit
86ccc887
authored
Jan 28, 2008
by
pekka@sama.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#34046 - rename Ndbd_mem_manager::log2 to ndb_log2
parent
5b0280e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
storage/ndb/src/kernel/vm/NdbdSuperPool.cpp
storage/ndb/src/kernel/vm/NdbdSuperPool.cpp
+1
-1
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
+4
-4
storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp
storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp
+1
-1
No files found.
storage/ndb/src/kernel/vm/NdbdSuperPool.cpp
View file @
86ccc887
...
@@ -48,7 +48,7 @@ NdbdSuperPool::NdbdSuperPool(class Ndbd_mem_manager & mm,
...
@@ -48,7 +48,7 @@ NdbdSuperPool::NdbdSuperPool(class Ndbd_mem_manager & mm,
{
{
m_memRoot
=
m_mm
.
get_memroot
();
m_memRoot
=
m_mm
.
get_memroot
();
m_shift
=
Ndbd_mem_manager
::
log2
((
1
<<
(
BMW_2LOG
+
2
))
/
pageSize
)
-
1
;
m_shift
=
Ndbd_mem_manager
::
ndb_
log2
((
1
<<
(
BMW_2LOG
+
2
))
/
pageSize
)
-
1
;
m_add
=
(
1
<<
m_shift
)
-
1
;
m_add
=
(
1
<<
m_shift
)
-
1
;
}
}
...
...
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
View file @
86ccc887
...
@@ -125,7 +125,7 @@ do_malloc(Uint32 pages, InitChunk* chunk)
...
@@ -125,7 +125,7 @@ do_malloc(Uint32 pages, InitChunk* chunk)
}
}
Uint32
Uint32
Ndbd_mem_manager
::
log2
(
Uint32
input
)
Ndbd_mem_manager
::
ndb_
log2
(
Uint32
input
)
{
{
input
=
input
|
(
input
>>
8
);
input
=
input
|
(
input
>>
8
);
input
=
input
|
(
input
>>
4
);
input
=
input
|
(
input
>>
4
);
...
@@ -400,7 +400,7 @@ Ndbd_mem_manager::alloc(Uint32* ret, Uint32 *pages, Uint32 min)
...
@@ -400,7 +400,7 @@ Ndbd_mem_manager::alloc(Uint32* ret, Uint32 *pages, Uint32 min)
Int32
i
;
Int32
i
;
Uint32
start
;
Uint32
start
;
Uint32
cnt
=
*
pages
;
Uint32
cnt
=
*
pages
;
Uint32
list
=
log2
(
cnt
-
1
);
Uint32
list
=
ndb_
log2
(
cnt
-
1
);
assert
(
cnt
);
assert
(
cnt
);
assert
(
list
<=
16
);
assert
(
list
<=
16
);
...
@@ -438,7 +438,7 @@ Ndbd_mem_manager::alloc(Uint32* ret, Uint32 *pages, Uint32 min)
...
@@ -438,7 +438,7 @@ Ndbd_mem_manager::alloc(Uint32* ret, Uint32 *pages, Uint32 min)
* search in other lists...
* search in other lists...
*/
*/
Int32
min_list
=
log2
(
min
-
1
);
Int32
min_list
=
ndb_
log2
(
min
-
1
);
assert
((
Int32
)
list
>=
min_list
);
assert
((
Int32
)
list
>=
min_list
);
for
(
i
=
list
-
1
;
i
>=
min_list
;
i
--
)
for
(
i
=
list
-
1
;
i
>=
min_list
;
i
--
)
{
{
...
@@ -470,7 +470,7 @@ Ndbd_mem_manager::alloc(Uint32* ret, Uint32 *pages, Uint32 min)
...
@@ -470,7 +470,7 @@ Ndbd_mem_manager::alloc(Uint32* ret, Uint32 *pages, Uint32 min)
void
void
Ndbd_mem_manager
::
insert_free_list
(
Uint32
start
,
Uint32
size
)
Ndbd_mem_manager
::
insert_free_list
(
Uint32
start
,
Uint32
size
)
{
{
Uint32
list
=
log2
(
size
)
-
1
;
Uint32
list
=
ndb_
log2
(
size
)
-
1
;
Uint32
last
=
start
+
size
-
1
;
Uint32
last
=
start
+
size
-
1
;
Uint32
head
=
m_buddy_lists
[
list
];
Uint32
head
=
m_buddy_lists
[
list
];
...
...
storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp
View file @
86ccc887
...
@@ -75,7 +75,7 @@ public:
...
@@ -75,7 +75,7 @@ public:
* @note size = 0 -> 0
* @note size = 0 -> 0
* @note size > 65536 -> 16
* @note size > 65536 -> 16
*/
*/
static
Uint32
log2
(
Uint32
size
);
static
Uint32
ndb_
log2
(
Uint32
size
);
private:
private:
void
grow
(
Uint32
start
,
Uint32
cnt
);
void
grow
(
Uint32
start
,
Uint32
cnt
);
...
...
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