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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a9ab9d05
Commit
a9ab9d05
authored
Aug 11, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default = memset(0)
parent
87b22e8a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
10 deletions
+18
-10
ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
+4
-2
ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
+2
-1
ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
+2
-1
ndb/src/kernel/vm/SimulatedBlock.cpp
ndb/src/kernel/vm/SimulatedBlock.cpp
+8
-4
ndb/src/kernel/vm/SimulatedBlock.hpp
ndb/src/kernel/vm/SimulatedBlock.hpp
+2
-2
No files found.
ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
View file @
a9ab9d05
...
...
@@ -94,7 +94,8 @@ void Dbacc::initRecords()
page8
=
(
Page8
*
)
allocRecord
(
"Page8"
,
sizeof
(
Page8
),
cpagesize
);
cpagesize
,
false
);
rootfragmentrec
=
(
Rootfragmentrec
*
)
allocRecord
(
"Rootfragmentrec"
,
sizeof
(
Rootfragmentrec
),
...
...
@@ -114,7 +115,8 @@ void Dbacc::initRecords()
undopage
=
(
Undopage
*
)
allocRecord
(
"Undopage"
,
sizeof
(
Undopage
),
cundopagesize
);
cundopagesize
,
false
);
// Initialize BAT for interface to file system
...
...
ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
View file @
a9ab9d05
...
...
@@ -121,7 +121,8 @@ void Dblqh::initRecords()
logPageRecord
=
(
LogPageRecord
*
)
allocRecord
(
"LogPageRecord"
,
sizeof
(
LogPageRecord
),
clogPageFileSize
);
clogPageFileSize
,
false
);
pageRefRecord
=
(
PageRefRecord
*
)
allocRecord
(
"PageRefRecord"
,
sizeof
(
PageRefRecord
),
...
...
ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
View file @
a9ab9d05
...
...
@@ -698,7 +698,8 @@ void Dbtup::initRecords()
page
=
(
Page
*
)
allocRecord
(
"Page"
,
sizeof
(
Page
),
cnoOfPage
);
cnoOfPage
,
false
);
pageRange
=
(
PageRange
*
)
allocRecord
(
"PageRange"
,
sizeof
(
PageRange
),
...
...
ndb/src/kernel/vm/SimulatedBlock.cpp
View file @
a9ab9d05
...
...
@@ -636,7 +636,7 @@ SimulatedBlock::getBatSize(Uint16 blockNo){
}
void
*
SimulatedBlock
::
allocRecord
(
const
char
*
type
,
size_t
s
,
size_t
n
)
SimulatedBlock
::
allocRecord
(
const
char
*
type
,
size_t
s
,
size_t
n
,
bool
clear
)
{
void
*
p
=
NULL
;
...
...
@@ -657,16 +657,20 @@ SimulatedBlock::allocRecord(const char * type, size_t s, size_t n)
char
buf2
[
255
];
snprintf
(
buf1
,
sizeof
(
buf1
),
"%s could not allocate memory for %s"
,
getBlockName
(
number
()),
type
);
snprintf
(
buf2
,
sizeof
(
buf2
),
"Requested: %ux%u = %u bytes"
,
(
Uint32
)
s
,
(
Uint32
)
n
,
(
Uint32
)
size
);
snprintf
(
buf2
,
sizeof
(
buf2
),
"Requested: %ux%u = %u bytes"
,
(
Uint32
)
s
,
(
Uint32
)
n
,
(
Uint32
)
size
);
ERROR_SET
(
fatal
,
ERR_MEMALLOC
,
buf1
,
buf2
);
}
if
(
clear
)
memset
(
p
,
0
,
size
);
}
return
p
;
}
void
SimulatedBlock
::
deallocRecord
(
void
**
ptr
,
const
char
*
type
,
size_t
s
,
size_t
n
)
const
{
const
char
*
type
,
size_t
s
,
size_t
n
){
(
void
)
type
;
(
void
)
s
;
(
void
)
n
;
...
...
ndb/src/kernel/vm/SimulatedBlock.hpp
View file @
a9ab9d05
...
...
@@ -350,14 +350,14 @@ protected:
* Allocates memory for the datastructures where ndb keeps the data
*
*/
void
*
allocRecord
(
const
char
*
type
,
size_t
s
,
size_t
n
);
void
*
allocRecord
(
const
char
*
type
,
size_t
s
,
size_t
n
,
bool
clear
=
true
);
/**
* Deallocate record
*
* NOTE: Also resets pointer
*/
void
deallocRecord
(
void
**
,
const
char
*
type
,
size_t
s
,
size_t
n
)
const
;
void
deallocRecord
(
void
**
,
const
char
*
type
,
size_t
s
,
size_t
n
);
/**
* General info event (sent to cluster log)
...
...
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