OSDN Git Service

Fix a leak in the JIT.
authorElliott Hughes <enh@google.com>
Fri, 20 Apr 2012 00:16:08 +0000 (17:16 -0700)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 19 Jun 2012 05:38:34 +0000 (13:38 +0800)
We should use the JIT's arena rather than explicit allocation/deallocation.

Change-Id: I12b78cb1586222b082b140e4a1db00969ce23e3c

vm/compiler/Loop.cpp

index 90c97d7..301df7a 100644 (file)
@@ -678,7 +678,7 @@ bool dvmCompilerLoopOpt(CompilationUnit *cUnit)
     cUnit->loopAnalysis = loopAnalysis;
 
     /* Constant propagation */
-    cUnit->isConstantV = dvmAllocBitVector(cUnit->numSSARegs, false);
+    cUnit->isConstantV = dvmCompilerAllocBitVector(cUnit->numSSARegs, false);
     cUnit->constantValues =
         (int *)dvmCompilerNew(sizeof(int) * cUnit->numSSARegs,
                               true);
@@ -692,7 +692,7 @@ bool dvmCompilerLoopOpt(CompilationUnit *cUnit)
     loopAnalysis->ivList =
         (GrowableList *)dvmCompilerNew(sizeof(GrowableList), true);
     dvmInitGrowableList(loopAnalysis->ivList, 4);
-    loopAnalysis->isIndVarV = dvmAllocBitVector(cUnit->numSSARegs, false);
+    loopAnalysis->isIndVarV = dvmCompilerAllocBitVector(cUnit->numSSARegs, false);
     dvmCompilerDataFlowAnalysisDispatcher(cUnit,
                                           dvmCompilerFindInductionVariables,
                                           kAllNodes,