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
29050124
Commit
29050124
authored
Oct 16, 2007
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't allocate a megabyte on the stack
git-svn-id:
file:///svn/tokudb@472
c7de825b-a66e-492c-adef-691d508d4ae1
parent
9fefe9b2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
newbrt/brt-serialize.c
newbrt/brt-serialize.c
+3
-1
No files found.
newbrt/brt-serialize.c
View file @
29050124
...
@@ -77,7 +77,8 @@ void serialize_brtnode_to(int fd, diskoff off, diskoff size, BRTNODE node) {
...
@@ -77,7 +77,8 @@ void serialize_brtnode_to(int fd, diskoff off, diskoff size, BRTNODE node) {
struct
wbuf
w
;
struct
wbuf
w
;
int
i
;
int
i
;
unsigned
int
calculated_size
=
serialize_brtnode_size
(
node
);
unsigned
int
calculated_size
=
serialize_brtnode_size
(
node
);
char
buf
[
size
];
//char buf[size];
char
*
MALLOC_N
(
size
,
buf
);
assert
(
size
>
0
);
assert
(
size
>
0
);
wbuf_init
(
&
w
,
buf
,
size
);
wbuf_init
(
&
w
,
buf
,
size
);
//printf("%s:%d serializing %lld w height=%d p0=%p\n", __FILE__, __LINE__, off, node->height, node->mdicts[0]);
//printf("%s:%d serializing %lld w height=%d p0=%p\n", __FILE__, __LINE__, off, node->height, node->mdicts[0]);
...
@@ -124,6 +125,7 @@ void serialize_brtnode_to(int fd, diskoff off, diskoff size, BRTNODE node) {
...
@@ -124,6 +125,7 @@ void serialize_brtnode_to(int fd, diskoff off, diskoff size, BRTNODE node) {
//printf("%s:%d wrote %d bytes for %lld size=%lld\n", __FILE__, __LINE__, w.ndone, off, size);
//printf("%s:%d wrote %d bytes for %lld size=%lld\n", __FILE__, __LINE__, w.ndone, off, size);
assert
(
w
.
ndone
<=
size
);
assert
(
w
.
ndone
<=
size
);
toku_free
(
buf
);
}
}
int
deserialize_brtnode_from
(
int
fd
,
diskoff
off
,
BRTNODE
*
brtnode
,
int
nodesize
)
{
int
deserialize_brtnode_from
(
int
fd
,
diskoff
off
,
BRTNODE
*
brtnode
,
int
nodesize
)
{
...
...
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