out-of-memory

OutOfMemoryError with image selection in Android. How to resize image before decoding it to bitmap?

不羁的心 提交于 2019-12-04 02:45:07
问题 I'm building an imagepicker in my Android app, for which I used the example code on this page. This basically gives me a button which opens the possibility to get a file from the SD card, or one by taking a picture. Once I selected an image, it displays the image using a simple ImageView. In general, this works perfectly well; I can select an image, then click the select image button again and select another image. So far so good.. with small files that is. The problem starts, when I use

Very strange OutOfMemoryError

旧时模样 提交于 2019-12-04 02:18:51
As always, a lengthy problem description. We are currently stress testing our product - and we now we face a strange problem. After one to two hours, heap space begins to grow, the application dies sometime later. Profiling the application shows a very large amount of Finalizer objects, filling the heap. Well, we thought "might be the weird finalizer thread to slow" issue and reviewed for reducing the amount of objects that need to be finalized (JNA native handles in this case). Good idea anyway and reduced thousands of new objects... The next tests showed the same pattern, only one hour later

Tensorflow: ran out of memory trying to allocate 3.90GiB. The caller indicates that this is not a failure

独自空忆成欢 提交于 2019-12-04 02:11:09
There is a question that I don't understand. Allocator (GPU_0_bfc) ran out of memory trying to allocate 3.90GiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory is available. What is the sentence mean? I have read the source code. But I cann't understand because of my poor ability. The memory size of GPU is 6GB, the result of memory use that I use tfprof analysis is about 14GB. That is beyond the memory size of GPU. The sentence is showing weather tensorflow allocate the memory of CPU or use the good algorithm about the use of

Why does running out of memory depend on intermediate calls to GC.GetTotalMemory?

本小妞迷上赌 提交于 2019-12-04 01:59:54
问题 A memory intensive program that I wrote ran out of memory: threw an OutOfMemory exception. During attempts to reduce memory usage, I started calling GC.GetTotalMemory(true) (to write the total memory usage to debug file), which triggers a garbage collect. For some reason, when calling this function I don't get an out of memory exception anymore. If I remove the calls again (keeping everything else the same), the exception gets thrown again. In my understanding, calls are automatically made to

java.lang.OutOfMemoryError: Java heap space on startup

时光毁灭记忆、已成空白 提交于 2019-12-04 01:44:59
问题 A few days ago I began encountering a java.lang.OutOfMemoryError: Java heap space exception on startup of MATLAB - before I run any piece of code or add anything to the path. The default directory MATLAB loads also has no files on it. I am running MATLAB R2012a on Windows 7 64 bit. What could be causing this? 回答1: Refer this How do I increase the heap space for the Java VM in MATLAB 6.0 (R12) and later versions? EDIT -Xms sets the initial size of the heap. Changing this will have no effect on

Why does 'Any CPU (prefer 32-bit)' allow me to allocate more memory than x86 under .NET 4.5?

有些话、适合烂在心里 提交于 2019-12-04 00:53:39
According to many SO answers and this widely cited blog post , a .NET 4.5 application built for 'Any CPU' with the 'prefer 32-bit' option selected will run as a 32-bit process on both 32-bit and 64-bit systems (unlike in .NET 4.0 and earlier). In other words, x86 and AnyCPU with 'prefer 32-bit' selected are equivalent (ignoring whether or not it can run on ARM). However, my tests have shown that on a 64-bit system an 'AnyCPU prefer 32-bit' application (which I confirm runs 32-bit) can allocate more memory than an x86 one. I wrote a .NET 4.5 C# console app that allocates 10MB byte arrays in a

How to release memory of bitmap using imageloader in android?

喜你入骨 提交于 2019-12-04 00:28:53
I am loading images into a grid view from a server. For this, I'm using Universal Image loader. I am using the image loader inside the getview() method of the adapter. It takes the URL of the image from arraylist & loads the image from server. Images can be in 100's. I am displaying the grid view in a fragment so for each fragment there is a separate grid view. When I switch between multiple fragments for a long time I no longer get the out of memory error. Suggested solution : Release the unused bitmap. So I am loading the images using third party library. I am just passing the image view in

OutOfMemoryException when a lot of memory is available

两盒软妹~` 提交于 2019-12-03 23:24:23
We have an application that is running on 5 (server) nodes (16 cores, 128 GB Memory each) that loads almost 70 GB data on each machine. This application is distributed and serves concurrent clients, therefore, there is a lot of sockets usage. Similarly, for synchronization between multiple threads, there are a few synchronization techniques being used, mostly using System.Threading.Monitor . Now the problem is that while application is running and the data is traveling between these server nodes and between clients and servers, one or two server machines start receiving OutOfMemoryException

Spark java.lang.OutOfMemoryError : Java Heap space

这一生的挚爱 提交于 2019-12-03 23:06:13
I am geting the above error when i run a model training pipeline with spark `val inputData = spark.read .option("header", true) .option("mode","DROPMALFORMED") .csv(input) .repartition(500) .toDF("b", "c") .withColumn("b", lower(col("b"))) .withColumn("c", lower(col("c"))) .toDF("b", "c") .na.drop()` inputData has about 25 million rows and is about 2gb in size. the model building phase happens like so val tokenizer = new Tokenizer() .setInputCol("c") .setOutputCol("tokens") val cvSpec = new CountVectorizer() .setInputCol("tokens") .setOutputCol("features") .setMinDF(minDF) .setVocabSize

Maven import in Intellij IDEA runs out of memory on a large project

吃可爱长大的小学妹 提交于 2019-12-03 22:09:59
Import of Maven project ends with Exception java.lang.OutOfMemoryError: GC overhead limit exceeded I've tried to define an environment variable: MAVEN_OPTS = -Xmx1g . I've tried to add -Xmx1g to Maven VM options via Settings -> Build Tools -> Maven -> Runner. Without success. What else can I do? The solution is to set -Xmx1g (or more) in Maven VM options for importer (yes, it is a separate option!) . Go to "Settings -> Build Tools -> Maven -> Importing", and find the option there. Read more on JVM heap size: (Q) What are the Xms and Xmx parameters when starting JVMs? . Wangshen Bi if you want