Message305204
Here my code:
2 import sys
3 import ctypes
4
5
6 def hi():
7 class timespec(ctypes.Structure):
8 ┆ """Time specification, as described in clock_gettime(3)."""
9 ┆ _fields_ = (('tv_sec', ctypes.c_long),
10 ┆ ┆ ┆ ┆ ('tv_nsec', ctypes.c_long))
11
12
13 ts = timespec()
14 po = ctypes.pointer(ts)
15
16
17 def main():
18 while True:
19 ┆ test = hi()
20
21 if __name__ == "__main__":
22 sys 2 import sys
3 import ctypes
4
5
6 def hi():
7 class timespec(ctypes.Structure):
8 ┆ """Time specification, as described in clock_gettime(3)."""
9 ┆ _fields_ = (('tv_sec', ctypes.c_long),
10 ┆ ┆ ┆ ┆ ('tv_nsec', ctypes.c_long))
11
12
13 ts = timespec()
14 po = ctypes.pointer(ts)
15
16
17 def main():
18 while True:
19 ┆ test = hi()
20
21 if __name__ == "__main__":
22 sys.exit(main())
run this code, i find that the program occupy more and more VmRss
my python is 2.7.11, in python3 i also find this problem.
Is this normal?I am a newbie with python, not very familiar with some
python's internal principle.
Tanks. |
|
Date |
User |
Action |
Args |
2017-10-30 03:53:40 | Yang Big | set | recipients:
+ Yang Big, amaury.forgeotdarc, belopolsky, meador.inge |
2017-10-30 03:53:39 | Yang Big | set | messageid: <1509335619.79.0.213398074469.issue31896@psf.upfronthosting.co.za> |
2017-10-30 03:53:39 | Yang Big | link | issue31896 messages |
2017-10-30 03:53:38 | Yang Big | create | |
|