Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bake
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sds
bake
Commits
a9e5850a
Commit
a9e5850a
authored
Dec 06, 2018
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed the pool-zeroing code, useless
parent
a7c79ac2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
24 deletions
+1
-24
src/bake-server.c
src/bake-server.c
+1
-24
No files found.
src/bake-server.c
View file @
a9e5850a
...
...
@@ -87,30 +87,7 @@ int bake_makepool(
PMEMoid
root_oid
;
bake_root_t
*
root
;
int
fd
=
creat
(
pool_name
,
pool_mode
);
if
(
fd
<=
0
)
{
fprintf
(
stderr
,
"creat failed
\n
"
);
return
BAKE_ERR_ALLOCATION
;
}
char
*
buf
=
malloc
(
1024
*
1024
);
memset
(
buf
,
0
,
1024
*
1024
);
size_t
remaining
=
pool_size
;
while
(
remaining
)
{
if
(
remaining
>=
1024
*
1024
)
{
write
(
fd
,
buf
,
1024
*
1024
);
remaining
-=
1024
*
1024
;
}
else
{
write
(
fd
,
buf
,
remaining
);
remaining
=
0
;
}
}
free
(
buf
);
close
(
fd
);
pool
=
pmemobj_create
(
pool_name
,
NULL
,
0
,
pool_mode
);
pool
=
pmemobj_create
(
pool_name
,
NULL
,
pool_size
,
pool_mode
);
if
(
!
pool
)
{
fprintf
(
stderr
,
"pmemobj_create: %s
\n
"
,
pmemobj_errormsg
());
...
...
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