out-of-memory

OutOfMemoryError on ViewPager

▼魔方 西西 提交于 2019-12-12 22:31:34
问题 I'm using a ViewPager with 13 pages. It is managed using a FragmentStatePagerAdapter, and each page loads 250ko images as backgrounds, and sometimes 5 images more per page. I get extremely often an OutOfMemoryError error and I'm testing my app on a Samsung Galaxy Tab 2, so I guess I'm doing something wrong. Is there a way to release images which are not used on the life cycles of my Fragments on the ViewPager? Any other idea? Thanks in advance. 回答1: Everything is very well explained and

Exception in thread “AWT-EventQueue-0” java.lang.OutOfMemoryError: Java heap space

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 22:09:00
问题 Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space at java.awt.image.DataBufferInt.<init>(Unknown Source) at java.awt.image.Raster.createPackedRaster(Unknown Source) at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source) at java.awt.image.BufferedImage.<init>(Unknown Source) at sun.java2d.loops.GraphicsPrimitive.convertFrom(Unknown Source) at sun.java2d.loops.GraphicsPrimitive.convertFrom(Unknown Source) at sun.java2d.loops.MaskBlit

Hibernate Cache1 OutOfMemory with OpenSessionInView

大兔子大兔子 提交于 2019-12-12 21:25:38
问题 I've got a Vehicle entity, with a Vehicle DTO. I use OpenSessionInView with Stripes. In my Stripes action bean, i need to generate a csv containing the data for about 50000 Vehicles. Thus, as a Stripes developer told me to do, i write the file to the outputstream in the following method: StreamingResolution() {...}.stream(HttpServletResponse) I have a service that take some pagination information, load a part of the vehicles and transform them into DTO's. These dto's are returned to the view

Is there a Threshold for “Out of Memory” error?

拥有回忆 提交于 2019-12-12 20:48:01
问题 When I use some code like, x = randi(100,[1000 1000000]); I get the Out of Memory error. However when I have, x = randi(100,[1000 500000]); I don't get any error but my laptop almost stops working! and that sometimes costs me a force shutdown . I would really prefer the Out of Memory error! Q1+Q2: Is there a threshold for that error, which I could adjust ? Q3: Or any other suggestions (maybe limit the memory that MATLAB can have access)? Thanks, 回答1: A1: Yes, the Memory is the Treshold While

Why does calling next on an Iterator trait object give me an “out of memory” at runtime?

只愿长相守 提交于 2019-12-12 20:30:21
问题 I implemented a BoxedIterator in Rust that just boxes another Iterator as a trait object. The full implementation is on Github. Why does Rust compile this code without complaint but fail with an "out of memory" message (OOM) when it first tries to call next on the Iterator trait object in the Box ? As far as I can tell it doesn't allocate much memory before failing, so I'm inclined to think the OOM message is not correct. //! BoxedIterator just wraps around a box of an iterator, it is an

Displaying a bitmap of arbitrary size without running out of memory

穿精又带淫゛_ 提交于 2019-12-12 19:34:41
问题 How do I display an image of arbitrary size without OOMing or downscaling the image. I dont want to downscale due to zooming and dragging of the picture? If it isnt possible to display an image of arbitrary size, how do I determine the maximum possible size of the image to display, without causing a OOM? 回答1: Bitmap data is aloccated in the Native heap rather than the VM heap. see BitmapFactory OOM driving me nuts for details on how to monitor the Native heap and how big your bitmap can get

OutOfMemory Exception when recursively drawing rectangles in GDI+

强颜欢笑 提交于 2019-12-12 15:47:01
问题 I have a problem drawing and filling rectangles in C# using GDI+. I'm trying to render a treemap and have therefore constructed a recursive algorithm which traverses the tree structure from root to leaf levels and draws a rectangle in any case, but also fills the rectangle if the node happens to be a leaf node. The code works fine for smaller trees, but reproducably crashes for a larger data set which has 42 layers of nodes. The upper DrawRectangle call throws an OutOfMemoryException when

How to reduce memory usage for Meteor?

自古美人都是妖i 提交于 2019-12-12 14:54:24
问题 I created a very simple Meteor (v1.0.1, development mode) web application, it's on a staging server so only a few users has access to it. The server is on Rackspace and have 1GB of memory. When I returned from my weekend break, I get this error: FATAL ERROR: Evacuation Allocation failed - process out of memory Aborted (core dumped) I restarted the application and ran top . I see that I only have 70MB of memory left, and the top three process are from meteor, taking up nearly 60% of the memory

WAR file throws OutOfMemoryError in Tomcat server

╄→尐↘猪︶ㄣ 提交于 2019-12-12 13:28:09
问题 I have a Spring MVC WAR file that works perfectly in my local machine (program and website). Once I upload the file into the server (a Tomcat 7 ) and try to access it, the catalina log file indicates java.lang.OutOfMemoryError . I have tried modifying the memory in the Arguments tab of Eclipse IDE's Run > Run Configurations section by appending -Xmx2048m or -Xmx1024m to the VM Arguments section before exporting but neither did any changes except the first resulted into a Error occurred during

How to prevent heap filling up

血红的双手。 提交于 2019-12-12 12:53:27
问题 Firstly forgive me for what might be a very naive question. I am on a mission to identify the right nosql database for my project. I was inserting and updating records in the table (column family) in highly concurrent fashion. Then i encountered this. INFO 11:55:20,924 Writing Memtable-scan_request@314832703(496750/1048576 serialized/live bytes, 8204 ops) INFO 11:55:21,084 Completed flushing /var/lib/cassandra/data/mykey/scan_request/mykey-scan_request-ic-14-Data.db (115527 bytes) for