out-of-memory

Avoid an “out of memory error” in Java(eclipse), when using large data structure?

不羁岁月 提交于 2019-12-20 03:24:38
问题 OK, so I am writing a program that unfortunately needs to use a huge data structure to complete its work, but it is failing with a "out of memory error" during its initialization. While I understand entirely what that means and why it is a problem, I am having trouble overcoming it, since my program needs to use this large structure and I don't know any other way to store it. The program first indexes a large corpus of text files that I provide. This works fine. Then it uses this index to

Picasso gives out of memory when load an image

心已入冬 提交于 2019-12-20 02:43:12
问题 I am using Picasso to load images from my server and display them in ImageView. I observes some crash reports from user's phone where Out of Memory Exception happens when Picasso is trying to load an image into ImageView. The stack trace as below: java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596) at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444) at

Picasso gives out of memory when load an image

微笑、不失礼 提交于 2019-12-20 02:43:07
问题 I am using Picasso to load images from my server and display them in ImageView. I observes some crash reports from user's phone where Out of Memory Exception happens when Picasso is trying to load an image into ImageView. The stack trace as below: java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596) at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444) at

System.OutOfMemoryException - when Entity Framework is querying a too big data of Varbinary type

删除回忆录丶 提交于 2019-12-20 02:09:06
问题 I'm trying to query a varbinary column that contain a file (1,2 Gb). I'm using Entity Framework. See below: Database to test CREATE TABLE [dbo].[BIGDATA] ( [id] [bigint] IDENTITY(1,1) NOT NULL, [BIGDATA] [varbinary](max) NULL, CONSTRAINT [PK_BIGDATA] PRIMARY KEY CLUSTERED ([id] ASC) ) ON [PRIMARY] Data to test (any file with 1 Gb) INSERT INTO [dbo].[BIGDATA]([BIGDATA]) VALUES ((SELECT BulkColumn FROM OPENROWSET(BULK N'C:\BigTest.txt', SINGLE_BLOB) AS Document)) Controller to download file

java.lang.OutOfMemoryError: Failed to allocate a 571401228 byte allocation with 16777216 free bytes and 495MB until OOM

ぐ巨炮叔叔 提交于 2019-12-19 11:54:56
问题 I got an error with my android application. I want to use a viewPager as an android image slider, for this I got my AndroidImageAdapter.java, but when it comes to the method instantiateItem the application aborts and I don't know how to fix it. I already looked up the failure and added android:hardwareAccelerated="false" android:largeHeap="true" to my manifest, but it still remains. Here is the complete error code: java.lang.OutOfMemoryError: Failed to allocate a 571401228 byte allocation

How to process large video in Matlab with for loop and without memory error

冷暖自知 提交于 2019-12-19 11:40:28
问题 I'm new to Matlab processing, and I would like to read and process a large video (more than 200k frames) inside a "for loop" (or without it). In particular, i would like to: read the video with VideoReader, subdivide the video into n-epoch of 1000 frames each ones, process every epoch of 1000 frames, reading: the first frame of the epoch, skip two, read the frame, skip two, and so on (for example i=1:3:nFrames), considering every epoch i need to convert every "RGB-frame" read into im2bw after

allocate unified memory in my program. aftering running, it throws CUDA Error:out of memory,but still has free memory

ぃ、小莉子 提交于 2019-12-19 09:47:33
问题 Before asking this, I have read this question , which is similar to mine. Here I will provide my program in detail. #define N 70000 #define M 1000 class ObjBox {public: int oid; float x; float y; float ts}; class Bucket {public: int bid; int nxt; ObjBox *arr_obj; int nO;} int main() { Bucket *arr_bkt; cudaMallocManaged(&arr_bkt, N * sizeof(Bucket)); for (int i = 0; i < N; i++) { arr_bkt[i].bid = i; arr_bkt[i].nxt = -1; arr_bkt[i].nO = 0; cudaError_t r = cudaMallocManaged(&(arr_bkt[i].arr_obj)

GZIP decompression C# OutOfMemory

强颜欢笑 提交于 2019-12-19 07:07:11
问题 I have many large gzip files (approximately 10MB - 200MB) that I downloaded from ftp to be decompressed. So I tried to google and find some solution for gzip decompression. static byte[] Decompress(byte[] gzip) { using (GZipStream stream = new GZipStream(new MemoryStream(gzip), CompressionMode.Decompress)) { const int size = 4096; byte[] buffer = new byte[size]; using (MemoryStream memory = new MemoryStream()) { int count = 0; do { count = stream.Read(buffer, 0, size); if (count > 0) { memory

Out of memory error when inflating simple xml layout in android

旧城冷巷雨未停 提交于 2019-12-19 05:47:12
问题 I have an out if memory error reported by some users on google play that i cant seem to reproduce no matter how hard I try. The error is shown on the line of my java file where I try to set the layout of my file. Here is the complete dump of logcat: {java.lang.RuntimeException: Unable to start activity ComponentInfo{org.djodjo.android.sport.GrassrootsDragRacing/org.djodjo.android.sport.GrassrootsDragRacing.LogSheet}: android.view.InflateException: Binary XML file line #2: Error inflating

Why does heap space run out only when running JUnit tests?

假如想象 提交于 2019-12-19 05:05:14
问题 When running JUnit tests, I always seem to run into this error: eclipse outOfMemoryError: heap space I have monitored Eclipse with JConsole and heap memory peaks at about 150MB. I have set heap memory to 1GB. I am using the following arguments when starting Eclipse: -vm "C:\Program Files\Java\jre1.5.0_08\bin\javaw.exe" -vmargs -Xmx1024M -XX:MaxPermSize=128M -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Does