Hi, Should I expect the virtual memory allocation to go up if I do the following? ----- raw = open("data").read() while True: d = eval(raw) -----
I would have expected the memory allocated to the object referenced by d to be deallocated, garbage collected, and reallocated for the new eval(raw) results, assigned to d. The file contains a large, SIMPLE (no self refs; all native python types/objects) dictionary (>300K). While doing 'd = eval(raw)' in the python interpreter I am monitoring the VIRT column of top and it keeps increasing until I run out of memory. When I use a safe_eval() from: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/364469 I have no memory problems. I see this under python 2.3.5 (fast and obvious). Thanks, John _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com