out-of-memory

Limit total memory consumption of Java process (in Cloud Foundry)

只谈情不闲聊 提交于 2019-12-02 21:03:49
问题 Related to these two questions: How to set the maximum memory usage for JVM? What would cause a java process to greatly exceed the Xmx or Xss limit? I run a Java application on Cloud Foundry and need to make sure that the allocated memory is not exceeded. Otherwise, and this is the current issue, the process is killed by Cloud Foundry monitoring mechanisms (Linux CGROUP). The Java Buildpack automatically sets sane values for -Xmx and -Xss . By tuning the arguments and configuring the (maximum

Android Bitmap Memory Issue - Error: Out of memory on a 8294416-byte allocation

大城市里の小女人 提交于 2019-12-02 21:02:25
I am currently developing an app that goes through a story. The story contains "scenes" which contain multiple JPEG and PNG files that are displayed via ImageViews. I create the ImageView and add at it to the layout via the following function: private ImageView newImage(Show show) { ImageView iv = new ImageView(this); String filePath = comin.generateFilePath(show); Log.i(TAG, "newImage, filePath = " + filePath + " id = " + show.id); WeakReference<Bitmap> bmp = new WeakReference<Bitmap>(scaleBitmap(filePath)); //added 4/1/13 //Bitmap bmp = scaleBitmap(filePath); Log.i(TAG, "newImage, width = "

PHPStorm/Webstorm increase memory to more than 512MB

核能气质少年 提交于 2019-12-02 21:01:57
I'm using PHPStorm under Win7 64bit with 64bit Java (latest version I guess) and working currently on an insanely big and chaotic project. There are many classes containing 10k LOC and more. Therefore my PHPStorm runs out of memory once in a while. I get this nice Out-of-Memory dialog suggesting increasing my memory settings. I currently have set in my PhpStorm.exe.vmoptions : -server -Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=64m -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+UseCodeCacheFlushing -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB

How to avoid OutOfMemoryException when running Hadoop?

 ̄綄美尐妖づ 提交于 2019-12-02 20:39:31
I'm running a Hadoop job over 1,5 TB of data with doing much pattern matching. I have several machines with 16GB RAM each, and I always get OutOfMemoryException on this job with this data (I'm using Hive). I would like to know how to optimally set option HADOOP_HEAPSIZE in file hadoop-env.sh so, my job would not fail. Is it even possible, to set this option so my jobs won't fail? When I set HADOOP_HEAPSIZE to 1,5 GB and removed half of pattern matching from query, job run successfully. So what is this option for, if it doesn't help avoiding job failures? I ment to do more experimenting with

Android loading images efficient (out of memory) [duplicate]

99封情书 提交于 2019-12-02 20:08:20
问题 This question already has answers here : Bitmap recycle with largeHeap enabled (5 answers) Closed 4 years ago . I just startet writing an app for Android. I have 3 activitys that use the same xml layout, an grid view. They also use all the same adapter to show an imageview and an textview in each grid item. When you select an object in the first activity, you get to the second and then to the third. First I used the normal method "imageView.setImageResource(drawableid)". It wasn't really a

View Pager with Universal Image Loader Out of Memory Error

自古美人都是妖i 提交于 2019-12-02 19:37:03
I am not really sure if a ViewPager with Universal Image Loader can/should be used as an alternate for a gallery like interface since I have run into an Out of Memory error while loading images from SD Card and viewing them in full screen mode. No matter what the number, it works all fine with a GridView but while viewing the images in the View Pager, each bitmap keeps eating up a lot of memory and after 10 or so images, it gives the out of memory error. I have seen almost all the questions that have been posted here related to the Out of Memory Error while working with the Universal Image

split huge 40000 page pdf into single pages, itextsharp, outofmemoryexception

谁说胖子不能爱 提交于 2019-12-02 19:33:37
I am getting huge PDF files with lots of data. The current PDF is 350 MB and has about 40000 pages. It would of course have been nice to get smaller PDFs, but this is what I have to work with now :-( I can open it in acrobat reader with some delay when loading but after that acrobat reader is quick. Now I need to split the huge file into single pages, then try to read some recipient data from the pdf pages, and then send the one or two pages that each recipient should get to each particular recipient. Here is my very small code so far using itextsharp: var inFileName = @"huge350MB40000pages

java.lang.OutOfMemoryError while converting over 100 Strings into to byte arrays

99封情书 提交于 2019-12-02 19:31:27
问题 Firstly, I understand questions regarding java.lang.OutOfMemoryError and Bitmaps have already been asked numerous times before. I have also checked out the Displaying Bitmaps Efficiently page. My use case: I am storing two different sized Bitmaps as Strings in an SQLite database. The first size of the Bitmaps is 50% of the screen width, and the second size is 100% of the screen width. I am using a RecyclerView which displays the images in ImageViews which are either 50% or 100% of the screen

How to solve Java error “pool-1-thread-xxxx” java.lang.OutOfMemory

岁酱吖の 提交于 2019-12-02 19:31:25
问题 I have searched the posts about this issue, but I did't see similar situation like mine. My java console shows the error message "pool-1-thread-xxxx" java.lang.OutOfMemory as the picture bellow: Red Line: CPU usage Green line: Memory usage I have increased the RAM from 6G to 10G , and set -Xms=8G -Xmx=8G -Xmn=3G in *.bat file before I start the program. I also keep watching performance monitor but the memory is always around 20%. I have no idea how could this happen. Any idea? Here is my run

Release bitmaps from android.view.GLES20DisplayList

天涯浪子 提交于 2019-12-02 18:55:10
Is anyone knows how to Release bitmaps from android.view.GLES20DisplayList. And why it keeps them alive even if you clean, let's say, ImageView manually? Or maybe there is a way to disable GLES20DisplayList, tried to use android:hardwareAccelerated="false" in AndroidManifest, still no luck. Looks like affected only in 4.2(1) update: looks like you can't disable hardware acceleration on 4.2.1 (bug?) simple test: Android manifest: application ... android:hardwareAccelerated="false" System.out.println("isHardwareAccelerated: " + mListView.isHardwareAccelerated()); mListView.setLayerType(LAYER