Unmap segments properly to avoid memory leaks

This commit is contained in:
Philipp Moritz
2016-06-24 16:56:26 -07:00
parent abaa4211d4
commit 8a0b8e8789
8 changed files with 53 additions and 6 deletions
+11
View File
@@ -330,6 +330,17 @@ class ReferenceCountingTest(unittest.TestCase):
x, objref_val = check_get_not_deallocated(val)
self.assertEqual(ray.scheduler_info()["reference_counts"][objref_val], 1)
# The following currently segfaults: The second "result = " closes the
# memory segment as soon as the assignment is done (and the first result
# goes out of scope).
"""
data = np.zeros([10, 20])
objref = ray.put(data)
result = worker.get(objref)
result = worker.get(objref)
self.assertTrue(np.alltrue(result == data))
"""
services.cleanup()
@unittest.expectedFailure