# Author: James Tam # Version: March 30, 2010 # A program that uses more and more of the memory in the computer each # time that function fun is recursively called. def fun (no): print (no) aList = [] # Creates a 10 million element list each element is a character (1 byte). # Total memory allocated for each call ~ 10 MB. for i in range (0, 10000000, 1): aList.append("*") no = no + 1 fun (no) def main (): fun (1) main ()