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
3b661a4b
Commit
3b661a4b
authored
Jan 29, 2014
by
Yoni Fogel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refs Tokutek/ft-index#46 fix overactive inequality assertion in mempool
parent
6b0c108c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
util/mempool.cc
util/mempool.cc
+2
-1
No files found.
util/mempool.cc
View file @
3b661a4b
...
@@ -148,7 +148,8 @@ void toku_mempool_reset(struct mempool *mp) {
...
@@ -148,7 +148,8 @@ void toku_mempool_reset(struct mempool *mp) {
}
}
void
toku_mempool_realloc_larger
(
struct
mempool
*
mp
,
size_t
data_size
)
{
void
toku_mempool_realloc_larger
(
struct
mempool
*
mp
,
size_t
data_size
)
{
invariant
(
data_size
>
mp
->
free_offset
);
invariant
(
data_size
>=
mp
->
free_offset
);
size_t
mpsize
=
data_size
+
(
data_size
/
4
);
// allow 1/4 room for expansion (would be wasted if read-only)
size_t
mpsize
=
data_size
+
(
data_size
/
4
);
// allow 1/4 room for expansion (would be wasted if read-only)
void
*
newmem
=
toku_xmalloc_aligned
(
64
,
mpsize
);
// allocate new buffer for mempool
void
*
newmem
=
toku_xmalloc_aligned
(
64
,
mpsize
);
// allocate new buffer for mempool
memcpy
(
newmem
,
mp
->
base
,
mp
->
free_offset
);
// Copy old info
memcpy
(
newmem
,
mp
->
base
,
mp
->
free_offset
);
// Copy old info
...
...
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