-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Hello, I read through #40
and
c10a030
When I run the following code
import tracemalloc
from glm import dvec3
import copy
if __name__ == "__main__":
test_dvec = dvec3(1, 2, 3)
tracemalloc.start()
snapshot1 = tracemalloc.take_snapshot()
while True:
copy_test = copy.deepcopy(test_dvec)
del copy_test
snapshot2 = tracemalloc.take_snapshot()
top_stats = snapshot2.compare_to(snapshot1, 'filename')
print(top_stats[:1], end='\r')
RAM usage increases without bound. If you run an equivalent test against numpy (or other number libraries) the memory usage remains stable:
import tracemalloc
import numpy as np
import copy
if __name__ == "__main__":
test_np = np.array([1, 2, 3])
tracemalloc.start()
snapshot1 = tracemalloc.take_snapshot()
while True:
copy_test = copy.deepcopy(test_np)
del copy_test
snapshot2 = tracemalloc.take_snapshot()
top_stats = snapshot2.compare_to(snapshot1, 'filename')
print(top_stats[:1], end='\r')
Metadata
Metadata
Assignees
Labels
No labels