BOSS
7.0.4
BESIII Offline Software System
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
x
z
Typedefs
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
v
Enumerations
_
e
f
g
h
i
l
m
o
p
r
s
t
Enumerator
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
u
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Related Functions
:
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
w
x
Files
File List
File Members
All
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
!
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
p
q
r
s
t
u
v
w
z
Enumerations
d
e
g
h
p
r
s
t
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
Simulation/SimHelpers/SimHelpers-00-00-01/SimHelpers/MemorySnooper.h
Go to the documentation of this file.
1
#ifndef MemorySnooper_H
2
#define MemorySnooper_H
3
4
#include <sys/types.h>
5
#include <unistd.h>
6
7
#include <string>
8
#include <fstream>
9
#include <sstream>
10
11
class
MemorySnooper
{
12
public
:
13
MemorySnooper
(std::string where)
14
{
15
int
pid=getpid();
16
std::ostringstream is;
17
is<<pid;
18
std::string spid=is.str();
19
std::string temp=
"cat /proc/"
+spid+
"/status | grep VmSize > mem.txt"
;
20
system(temp.c_str());
21
std::ifstream in(
"mem.txt"
);
22
std::string text,mem,text1;
23
in>>text>>mem>>text1;
24
system(
"rm -f mem.txt"
);
25
float
memsize=atof(mem.c_str());
26
imem=int(memsize);
27
std::cout<<
"*****************************************************"
<<std::endl
28
<<
"* *"
<<std::endl
29
<<
" Memory snooper called here "
<<where<<std::endl
30
<<
" process size at this point (VmMem): "
<<imem<<
" kBytes"
<<std::endl
31
<<
"* *"
<<std::endl
32
<<
"*****************************************************"
<<std::endl;
33
}
34
int
GetMemorySize
()
const
{
return
imem;}
35
private
:
36
int
imem;
37
};
38
39
#endif
MemorySnooper
Definition:
InstallArea/include/SimHelpers/SimHelpers/MemorySnooper.h:11
MemorySnooper::MemorySnooper
MemorySnooper(std::string where)
Definition:
Simulation/SimHelpers/SimHelpers-00-00-01/SimHelpers/MemorySnooper.h:13
MemorySnooper::GetMemorySize
int GetMemorySize() const
Definition:
Simulation/SimHelpers/SimHelpers-00-00-01/SimHelpers/MemorySnooper.h:34
source
Simulation
SimHelpers
SimHelpers-00-00-01
SimHelpers
MemorySnooper.h
Generated by
1.9.6