heap-memory

Tomcat 6 Heap Size - Is this correct?

杀马特。学长 韩版系。学妹 提交于 2019-12-09 07:11:20
问题 I am running multiple tomcats on a Red Hat box and I would like to configure separate heap size for each of them (some instances use more memory). Can I set the heap size min/max bt entering the following into the catalina.sh file: CATALINA_OPTS="-Xms64m -Xmx256m" Do I need add 'export'? i.e. export CATALINA_OPTS="-Xms64m -Xmx256m" 回答1: Best practice is to put the setting of environment variables in a file named setenv.sh / .bat in the bin folder. The catalina.sh script has logic to call into

How to shrink java heap space? [duplicate]

丶灬走出姿态 提交于 2019-12-09 04:50:17
问题 This question already has answers here : Is there a way to lower Java heap when not in use? (7 answers) Closed 5 years ago . I have a Java console app that's processing big xml files using DOM. Basically it creates xml files from data it takes from the DB. Now, as you guess it's using large amount of memory but, to my surprise, it's not related to bad code but to "java heap space not shrinking". I tried running my app from Eclipse using these JVM params: -Xmx700m -XX:MinHeapFreeRatio=10 -XX

CString use coupled with HeapWalk and HeapLock/HeapUnlock deadlocks in the kernel

こ雲淡風輕ζ 提交于 2019-12-08 14:16:05
问题 My goal is to lock virtual memory allocated for my process heaps (to prevent a possibility of it being swapped out to disk.) I use the following code: //pseudo-code, error checks are omitted for brevity struct MEM_PAGE_TO_LOCK{ const BYTE* pBaseAddr; //Base address of the page size_t szcbBlockSz; //Size of the block in bytes MEM_PAGE_TO_LOCK() : pBaseAddr(NULL) , szcbBlockSz(0) { } }; void WorkerThread(LPVOID pVoid) { //Called repeatedly from a worker thread HANDLE hHeaps[256] = {0}; //Assume

Unable to increase heap size for JMeter on Mac OSX

我的梦境 提交于 2019-12-08 11:29:28
Is there a way to increase heap size of JMeter in Mac OSX? I have tried editing the jmeter.bat file, but it didn't help. I edited the jmeter.sh file to add JVM_ARGS="-Xms3072m -Xmx3072m" jmeter.sh I tried the following also #!/bin/bash heap_size='3072m' JAVA_CMD="java -Xms$heap_size -Xmx$heap_size" meter` as suggested in this link increase the memory allocated to jmeter in ubuntu linux Does any one know how to do it in Mac OSX. I have java version as follows: java version 1.6.0_65 Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609) Java HotSpot(TM) 64-Bit Server VM (build 20.65

Size of the specific object's subtree in the JVM memory

荒凉一梦 提交于 2019-12-08 07:39:18
问题 Is it possible to check programatically how much memory takes some object (with the whole subtree in the JVM memory). I would like to say (from the java code) 'tell me how much memory in the current JVM takes the JPanel with the whole reference subtree when we assume that mentioned JPanel is the root of this tree'. I wonder if I could this way compare how much memory take two JPanels (or JFrame or whatever), and which takes more - without analyzing the dump. And I wonder if the answer is 'yes

Monitor Spark execution and storage memory utilization

蹲街弑〆低调 提交于 2019-12-08 02:25:36
问题 I know there are several ways to monitor storage memory utilization of a Spark application but does anyone know a way to monitor execution memory utilization. I am also looking for a way to monitor the "user memory", that is memory that is not used for execution nor storage memory. Going by Spark's documentation on memory management https://spark.apache.org/docs/latest/tuning.html the memory that is not allocated to M or spark.memory.fraction. 来源: https://stackoverflow.com/questions/48670247

Android BitmapFactory.Options.inSampleSize casuse application crash

与世无争的帅哥 提交于 2019-12-08 02:05:57
问题 We are working on a Android app that captures images and converts the same to Bitmap to be posted to a Rest service. While creating the Bitmap we have BitmapFactory.Options.isSample Size configured to value of 4 and this works fine on all device except for HTC One. The image in HTC one is distorted. When we change the value to 1 it shows a good image on HTC one but the application crashes on all other devices because of Memory issues. The issue is related to Heap size available. What is the

JVM Heapsize on 32 bit OS

我的未来我决定 提交于 2019-12-08 01:46:52
问题 I am using 32 bit win.7 and using Eclipse. Also having 4GB RAM. I want to allocate my java application a maximum heapsize of around 3 GB, but I am able to allocate maximum 1.5GB through VM arguments -Xmx1056m . What should I do? If I Install a 64 bit win.7. it would be able then to allocate 3GB heapsize to my app? 回答1: A regular 32-bit Windows process can only address 2GB of memory, even if you have more memory available. You can find the memory limits for different Windows versions here.

Finding Memory Requirements of Java Application

Deadly 提交于 2019-12-08 00:55:36
问题 We have a desktop Java Swing application. For shipping it, we need to specify the minimum memory requirements for deploying this application. In the JVM parameters we specify 2GB as max heap size. Is there any tool for a Windows based machine which can quantify the requirements? Also, as follow-up question, I would like to know: If we do not specify the max heap size in Java 7, does the JVM still automatically adjust the heap size on the fly before throwing an OutOfMemoryError? 回答1: Possible

Increase memory for jMeter on command line

て烟熏妆下的殇ゞ 提交于 2019-12-08 00:02:06
问题 I am running jMeter from the command line on a Mac. Today it threw an Out of memory, heap space error.... newbie$ sh jmeter.sh Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41) at java.awt.image.Raster.createPackedRaster(Raster.java:455) I know I need to increase the memory allocated to it, but not sure how. I looked at this post Unable to increase heap size for JMeter on Mac OSX and found that