cvsuser 02/11/04 09:14:16
Modified: . interpreter.c
Log:
fixed mem leak WRT prederef & exceptions
Revision Changes Path
1.108 +11 -7 parrot/interpreter.c
Index: interpreter.c
===================================================================
RCS file: /cvs/public/parrot/interpreter.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -w -r1.107 -r1.108
--- interpreter.c 4 Nov 2002 11:17:08 -0000 1.107
+++ interpreter.c 4 Nov 2002 17:14:16 -0000 1.108
@@ -1,7 +1,7 @@
/* interpreter.c
* Copyright: (When this is determined...it will go here)
* CVS Info
- * $Id: interpreter.c,v 1.107 2002/11/04 11:17:08 leo Exp $
+ * $Id: interpreter.c,v 1.108 2002/11/04 17:14:16 leo Exp $
* Overview:
* The interpreter api handles running the operations
* Data Structure and Algorithms:
@@ -312,12 +312,6 @@
interpreter->code = code;
interpreter->resume_offset = offset;
interpreter->resume_flag = 1;
- /* Okay, we've finished doing anything that might trigger GC.
- * Actually, we could enbale DOD/GC earlier, but here all setup is
- * done
- */
- interpreter->DOD_block_level--;
- interpreter->GC_block_level--;
while (interpreter->resume_flag) {
unsigned int slow;
@@ -555,6 +549,12 @@
/* Done. Return and be done with it */
+ /* Okay, we've finished doing anything that might trigger GC.
+ * Actually, we could enbale DOD/GC earlier, but here all setup is
+ * done
+ */
+ interpreter->DOD_block_level--;
+ interpreter->GC_block_level--;
interpreter->code = (struct PackFile *)NULL;
interpreter->profile = (ProfData *)NULL;
@@ -603,6 +603,10 @@
mem_sys_free(interpreter->perl_stash);
if (interpreter->profile)
mem_sys_free(interpreter->profile);
+ if (interpreter->prederef_code)
+ free(interpreter->prederef_code);
+ /* TODO cleanup JIT structures */
+
mem_sys_free(interpreter->warns);
/* XXX move this to register.c */