develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33887 - trunk/compilers/pirc/new

From:
kjs
Date:
December 14, 2008 08:32
Subject:
[svn:parrot] r33887 - trunk/compilers/pirc/new
Message ID:
20081214163249.15A4BCBA12@x12.develooper.com
Author: kjs
Date: Sun Dec 14 08:32:48 2008
New Revision: 33887

Modified:
   trunk/compilers/pirc/new/pirregalloc.c

Log:
[pirc] free memory of cached objects.

Modified: trunk/compilers/pirc/new/pirregalloc.c
==============================================================================
--- trunk/compilers/pirc/new/pirregalloc.c	(original)
+++ trunk/compilers/pirc/new/pirregalloc.c	Sun Dec 14 08:32:48 2008
@@ -98,6 +98,7 @@
 void
 destroy_linear_scan_regiser_allocator(lsr_allocator *lsr) {
     pir_type type;
+    live_interval *i;
 
     for (type = 0; type < 4; ++type) {
         live_interval *iter = lsr->intervals[type];
@@ -107,6 +108,14 @@
         }
     }
 
+    /* free all cached interval objects */
+    i = lsr->cached_intervals;
+    while (i != NULL) {
+        live_interval *tmp = i;
+        i = i->nextc;
+        mem_sys_free(tmp);
+    }
+
     mem_sys_free(lsr);
 }
 



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About