Path: utzoo!attcan!uunet!aplcen!haven!uflorida!rex!ukma!dftsrv!ames!sun-barr!newstop!sun!stef From: stef@zweig.sun (Stephane Payrard) Newsgroups: comp.lang.perl Subject: perl usage of memory? a long lasting perl server Message-ID: Date: 31 May 90 07:49:58 GMT Sender: news@sun.Eng.Sun.COM Distribution: comp Organization: Sun Microsystems -- Mountain View Lines: 38 Suppose I have a perl script living forever (implementing some kind of server with a growing context) which defines variables or/and arrays and later undefines some of them. Is perl sophisticated enough to reuse the memory left by the no more used `undefined variables'? If not, is there a scheme to exec a new instance of the script and feeding it with the context of its parent? So the son can resume the task where its dad left it. The scheme I imagine is that the father can exec a son and feed it (thru a pipe) with perl code interpreted by its son which sets the context of the son to be identical to the father. A modified version of dumpvar could do the trick It would obviate the fact that a Unix process can only grow. Once a while the process interpreting the perl script will disappear to leave its newly execed son to continue the task. Is it science fiction? Another question. Is there any recovery scheme in perl to handle the inability of allocating more memory. Larry? stef -- Stephane Payrard -- stef@sun.com -- (415) 336 3726 Sun Microsystems -- 2550 Garcia Avenue -- M/S 10-09 -- Mountain View CA 94043 room number: 138