Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
393ceeb9
Commit
393ceeb9
authored
15 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
plug a memory leak in slurmd (leak generated only once at daemon startup)
parent
01477ecf
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/slurmd/common/setproctitle.c
+17
-1
17 additions, 1 deletion
src/slurmd/common/setproctitle.c
src/slurmd/common/setproctitle.h
+1
-0
1 addition, 0 deletions
src/slurmd/common/setproctitle.h
src/slurmd/slurmd/slurmd.c
+2
-3
2 additions, 3 deletions
src/slurmd/slurmd/slurmd.c
with
20 additions
and
4 deletions
src/slurmd/common/setproctitle.c
+
17
−
1
View file @
393ceeb9
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
* src/slurmd/common/setproctitle.c - argv manipulation
* src/slurmd/common/setproctitle.c - argv manipulation
* $Id$
* $Id$
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 The Regents of the University of California.
* Copyright (C) 2002-2007 The Regents of the University of California.
* Copyright (C) 2008-2009 Lawrence Livermore National Security.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Mark Grondona <mgrondona@llnl.gov>.
* Written by Mark Grondona <mgrondona@llnl.gov>.
* CODE-OCEC-09-009. All rights reserved.
* CODE-OCEC-09-009. All rights reserved.
...
@@ -308,3 +309,18 @@ init_setproctitle(int argc, char *argv[])
...
@@ -308,3 +309,18 @@ init_setproctitle(int argc, char *argv[])
#endif
/* PS_USE_CLOBBER_ARGV */
#endif
/* PS_USE_CLOBBER_ARGV */
}
}
/* Free memory allocated by init_setproctitle.
* Used to verify that all allocated memory gets freed */
void
fini_setproctitle
(
void
)
{
#if SETPROCTITLE_STRATEGY == PS_USE_CLOBBER_ARGV
int
i
;
for
(
i
=
0
;
environ
[
i
]
!=
NULL
;
i
++
)
{
free
(
environ
[
i
]);
}
free
(
environ
);
environ
=
(
char
**
)
NULL
;
#endif
/* PS_USE_CLOBBER_ARGV */
}
This diff is collapsed.
Click to expand it.
src/slurmd/common/setproctitle.h
+
1
−
0
View file @
393ceeb9
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
#ifndef HAVE_SETPROCTITLE
#ifndef HAVE_SETPROCTITLE
void
setproctitle
(
const
char
*
fmt
,
...);
void
setproctitle
(
const
char
*
fmt
,
...);
void
init_setproctitle
(
int
argc
,
char
*
argv
[]);
void
init_setproctitle
(
int
argc
,
char
*
argv
[]);
void
fini_setproctitle
(
void
);
#endif
#endif
#endif
/* _BSD_SETPROCTITLE_H */
#endif
/* _BSD_SETPROCTITLE_H */
...
...
This diff is collapsed.
Click to expand it.
src/slurmd/slurmd/slurmd.c
+
2
−
3
View file @
393ceeb9
...
@@ -1078,9 +1078,7 @@ cleanup:
...
@@ -1078,9 +1078,7 @@ cleanup:
* Then exercise the slurmd functionality before executing
* Then exercise the slurmd functionality before executing
* > scontrol shutdown
* > scontrol shutdown
*
*
* There should be some definitely lost records from
* All allocated memory should be freed
* init_setproctitle (setproctitle.c), but it should otherwise account
* for all memory.
\**************************************************************************/
\**************************************************************************/
static
int
static
int
_slurmd_fini
()
_slurmd_fini
()
...
@@ -1093,6 +1091,7 @@ _slurmd_fini()
...
@@ -1093,6 +1091,7 @@ _slurmd_fini()
slurm_proctrack_fini
();
slurm_proctrack_fini
();
slurm_auth_fini
();
slurm_auth_fini
();
slurmd_req
(
NULL
);
/* purge memory allocated by slurmd_req() */
slurmd_req
(
NULL
);
/* purge memory allocated by slurmd_req() */
fini_setproctitle
();
return
SLURM_SUCCESS
;
return
SLURM_SUCCESS
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment