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
6202aa7c
Commit
6202aa7c
authored
Jan 29, 2002
by
heikki@donna.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mem0mem.c:
Add more diagnostic code to cath possible memory corruption
parent
8a7ecfb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
innobase/mem/mem0mem.c
innobase/mem/mem0mem.c
+9
-1
No files found.
innobase/mem/mem0mem.c
View file @
6202aa7c
...
...
@@ -50,7 +50,7 @@ of the blocks stay the same. An exception is, of course, the case
where the caller requests a memory buffer whose size is
bigger than the threshold. In that case a block big enough must
be allocated.
The heap is physically arranged so that if the current block
becomes full, a new block is allocated and always inserted in the
chain of blocks as the last block.
...
...
@@ -119,6 +119,10 @@ mem_heap_create_block(
ut_ad
((
type
==
MEM_HEAP_DYNAMIC
)
||
(
type
==
MEM_HEAP_BUFFER
)
||
(
type
==
MEM_HEAP_BUFFER
+
MEM_HEAP_BTR_SEARCH
));
if
(
heap
&&
heap
->
magic_n
!=
MEM_BLOCK_MAGIC_N
)
{
mem_analyze_corruption
((
byte
*
)
heap
);
}
/* In dynamic allocation, calculate the size: block header + data. */
if
(
init_block
!=
NULL
)
{
...
...
@@ -251,6 +255,10 @@ mem_heap_block_free(
ulint
len
;
ibool
init_block
;
if
(
block
->
magic_n
!=
MEM_BLOCK_MAGIC_N
)
{
mem_analyze_corruption
((
byte
*
)
block
);
}
UT_LIST_REMOVE
(
list
,
heap
->
base
,
block
);
type
=
heap
->
type
;
...
...
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