Re: Possible bug in MemoizedSymbol
| Newsgroups | gmane.comp.java.sisc.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Mar 13, 2003 at 06:19:33PM -0600, [email protected] wrote: > On Thu, Mar 13, 2003 at 05:22:51PM -0600, [email protected] wrote: > > On Thu, Mar 13, 2003 at 11:05:48PM +0100, Andreas Prohaska wrote: > > > > > > I think, I have found a memory leak in the MemoizedSymbol implementation. > > > However, I'm not too familiar with SISC so I may be wrong. This is what > > > I have done: > > > > > > I run a small scheme code like '(let ((a 1)) (+ a a))' in a single Context > > > for about 1000 times. It seems to me like the 'let' creates a kind of > > > naming context for all variables (e.g. 'a') created inside and stores > > > these variables as MemoizedSymbols (e.g. 'a_FooBarWhatEver'). These > > > MemoizedSymbols are stored in a static WeakHashMap with their names > > > (e.g. 'a_FooBarWhatEver') as key. > > > > Were you repeatedly calling eval() or something? If you run this code > > in a Scheme loop, you won't be compiling the code over and over and thus > > not generating new symbols. Nevertheless... > > Actually, even weirder: that particular expression should reduce to (+ > '1 '1) after the optimizer finishes with it. Was that actually the > expression? Though they still will be created *during* optimization, so nevermind. Scott
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+cSXrr9IW4v3mHtQRAtTwAJ9RftOntTSofeN0n9skPtXtCeK7ngCgh7A2 nHf9IEBv/Wy/RbskHRp5Otc= =ZjTy -----END PGP SIGNATURE-----