[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/29263] Memory leak in VMDouble.toString()

From: BenGardiner at nanometrics dot ca
Subject: [Bug classpath/29263] Memory leak in VMDouble.toString()
Date: 10 Jul 2009 19:39:25 -0000

------- Comment #5 from BenGardiner at nanometrics dot ca  2009-07-10 19:39 
Created an attachment (id=18177)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18177&action=view)
also free any _p5s allocated during the dtoa

I tried the patch in comment #3 but found that there were still some leaks with
the following test program, using the mtrace feature of glibc:

import java.util.Random;

public class DToATester

   * @param args
  public static void main(String[] args)
    Random random = new Random(1);
      double val = Double.longBitsToDouble(random.nextLong());
      System.out.print(val + " ");

turns out that there are some additional _Jv_Bigint's allocated in pow5mult
assigned to the '_p5s' linked-list member of reent. The following patch gets
rid of all allocations made in mprec_calloc -- according the mtrace. It was
created against gcj-4.3.3's import of classpath which I think is 0.92 according
to the classpath README.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]