Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
8ad4f10b
Commit
8ad4f10b
authored
Nov 07, 2017
by
Uwe Schulzweida
Browse files
cdoFinish: change units of memmax.
parent
4df69479
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/process.cc
View file @
8ad4f10b
...
...
@@ -1328,18 +1328,15 @@ void cdoFinish(void)
if
(
processID
==
0
)
{
int
mu
[]
=
{
'b'
,
'k'
,
'm'
,
'g'
,
't'
};
int
muindex
=
0
;
size_t
memmax
=
getPeakRSS
();
while
(
memmax
>
9999
)
if
(
memmax
)
{
memmax
/=
1024
;
muindex
++
;
int
muindex
=
0
;
while
(
memmax
>
9999
)
{
memmax
/=
1024
;
muindex
++
;
}
const
char
*
mu
[]
=
{
"B"
,
"KB"
,
"MB"
,
"GB"
,
"TB"
};
snprintf
(
memstring
,
sizeof
(
memstring
),
" %zu%s"
,
memmax
,
mu
[
muindex
]);
}
if
(
memmax
)
snprintf
(
memstring
,
sizeof
(
memstring
),
" %zu%c"
,
memmax
,
mu
[
muindex
]);
processEndTime
(
&
p_usertime
,
&
p_systime
);
p_cputime
=
p_usertime
+
p_systime
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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