out-of-memory

OutOfMemory exception in a lot of memory

↘锁芯ラ 提交于 2020-01-22 02:15:08
问题 Sorry for the bad question name but i couldn't find anything better. I have some code long heapFreeSize = Runtime.getRuntime().freeMemory(); URL url = new URL("http://example.com"); URLConnection myUrlConnection = url.openConnection(); GZIPInputStream gZIPInputStream = new GZIPInputStream(myUrlConnection.getInputStream()); StringBuffer decompressedStringBuffer = new StringBuffer(); int bytes_read; int bufferSize; heapFreeSize = Runtime.getRuntime().freeMemory(); while ((bytes_read =

iOS Download & Parsing Large JSON responses is causing CFData (store) leaks

非 Y 不嫁゛ 提交于 2020-01-21 10:20:33
问题 The first time a user opens my app I need to download lots of data. I get all of this data from the server in JSON form. Depending on the user, these JSON files can be anywhere from 10kb - 30mb each, and there are 10+ of them. I have no problems doing this when the JSONs have no more than 500 or so records, but like I said some have 10,000+ records and can be up to 30mb in size. When downloading the larger JSONs, my app allocs a ton of memory, until I eventually get memory warnings and the

Hibernate :OutOfMemoryError: PermGen space [duplicate]

旧城冷巷雨未停 提交于 2020-01-21 05:29:06
问题 This question already has answers here : Dealing with “java.lang.OutOfMemoryError: PermGen space” error (32 answers) Closed 5 years ago . could anyone say what's wrong with my application? public class HibernateUtil { private static final SessionFactory sessionFactory; static { try { sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); } catch (Throwable ex) { System.err.println("Initial SessionFactory creation failed." + ex); throw new ExceptionInInitializerError

VB 2013 Application Out of Memory

梦想的初衷 提交于 2020-01-17 02:55:49
问题 I'm new to VB but recently created my first working app :) Anyway it just compresses files and little bit more. The latest thing that I added was a marquee style progress bar to animate while the operation was in progress and stop when it ends and the user can do the next zip operation. The progress bar wasn't updating, so I used a background worker to do the actual task while the button click just did the animation. Since then I've notcied serious degredation in the app. It struggles to load

How do I solve a “java.lang.OutOfMemoryError: Java heap space”?

喜夏-厌秋 提交于 2020-01-17 01:19:32
问题 I am writing some code to parse a very large flat text file into objects which are persisted to a database. This is working on sections of the file (i.e. if I 'top' the first 2000 lines), but I am running into a java.lang.OutOfMemoryError: Java heap space error when I try and process the full file. I am using a BufferedReader to read the file line by line, and I was under the impression that this negates the requirement to load the entire text file into memory. Hopefully my code is fairly

out of memory exception caused by big array in java

家住魔仙堡 提交于 2020-01-15 23:39:42
问题 I'm implenmenting an algorithm which based on probabilistic latent semantic indexing(plsa) and the paper is hereand it need a four dimension array which named p_z_d_wt_wv, z is topic, d is document, wt is text word, wv is visual word,and the number of each dimension is about 12, 7000,100, 500, and the array is a double array, so it need 32G memory !! I allocate this memory like this way below, and it is just for demonstration as the number of wt and wv in each document is different. p_z_d_wt

out of memory exception caused by big array in java

丶灬走出姿态 提交于 2020-01-15 23:37:22
问题 I'm implenmenting an algorithm which based on probabilistic latent semantic indexing(plsa) and the paper is hereand it need a four dimension array which named p_z_d_wt_wv, z is topic, d is document, wt is text word, wv is visual word,and the number of each dimension is about 12, 7000,100, 500, and the array is a double array, so it need 32G memory !! I allocate this memory like this way below, and it is just for demonstration as the number of wt and wv in each document is different. p_z_d_wt

Optimizing GridLayout's memory usage

落花浮王杯 提交于 2020-01-15 17:34:39
问题 I'm simulating a tile-based map in Android using android-support-v7-gridlayout. I implement it smoothly and fast during the debugging times until I test it on a huge data scale. The actual data would be about ~700x400 ( row-column ) and I just tested it in 400x100 but the application has just crashed and throws an OutOfMemoryException . I then reduced the data until it actually runs on 300x100 . It's not lagging or I don't have any CPU performance issue, the only issue is inadequate memory.

Optimizing GridLayout's memory usage

試著忘記壹切 提交于 2020-01-15 17:32:00
问题 I'm simulating a tile-based map in Android using android-support-v7-gridlayout. I implement it smoothly and fast during the debugging times until I test it on a huge data scale. The actual data would be about ~700x400 ( row-column ) and I just tested it in 400x100 but the application has just crashed and throws an OutOfMemoryException . I then reduced the data until it actually runs on 300x100 . It's not lagging or I don't have any CPU performance issue, the only issue is inadequate memory.

Scala performance - Sieve

我的梦境 提交于 2020-01-15 12:54:47
问题 Right now, I am trying to learn Scala . I've started small, writing some simple algorithms . I've encountered some problems when I wanted to implement the Sieve algorithm from finding all all prime numbers lower than a certain threshold . My implementation is: import scala.math object Sieve { // Returns all prime numbers until maxNum def getPrimes(maxNum : Int) = { def sieve(list: List[Int], stop : Int) : List[Int] = { list match { case Nil => Nil case h :: list if h <= stop => h :: sieve