heap-memory

Is my Glassfish setup leaking memory?

﹥>﹥吖頭↗ 提交于 2019-12-24 04:40:06
问题 I've got a Glassfish v3 server running a few web applications (servlets, JSP, JDBC). I'd been noticing that if I let Glassfish run for a long time, it will consume all of the memory available (this is running on a server with 750 MB of memory). I figured that there must be a memory leak, so I ran the server while monitoring it with JProfiler and noticed that when I get a peak in traffic, my memory usage shoots up (as expected), but then quickly drops back down. I'm wondering if the issue is

Why doesn't valgrind massif report any function names or code references?

喜夏-厌秋 提交于 2019-12-24 01:45:31
问题 I have a program that is unexpectedly using a large amount of heap (about 3GB). I ran it through valgrind memcheck which reported no leaks, claiming that all the heap memory is still reachable. So I rebuilt all my libraries with debug options, and ran the prog through valgrind massif. I am using Valgrind-3.8.1 which I just downloaded and built on my box today. The command line was: valgrind --tool=massif myprog Valgrind produced no errors or warnings. The resulting output file is reporting

Assembly: dynamic memory allocation without malloc and syscalls? [FreeDOS application]

强颜欢笑 提交于 2019-12-23 12:53:55
问题 My question is about the logic of dynamic memory allocation in assembly (particularly, MASM). There are lot of articles on this topic and all of them rely on the use of malloc or brk. However, according to my understanding, malloc as a part of C language must (or could) be certainly written on assembly. Idem for brk, because it's a part of the operating system, thus also written on C which can be replaced 1 to 1 by assembly. Very very long time ago I have seen an article in PCMag about

contradiction between !heap -x -v and !heap -flt s

吃可爱长大的小学妹 提交于 2019-12-23 09:48:44
问题 I'm analyzing a dump which shows something strange: there seem to be a contradiciton between the command !heap -x -v hexadecimal_address and !heap -flt s size_of_block I'm inquiring about dangling pointers. In this dump, this dangling pointer happened to be: 0x0bdd00c0 To retrieve info about the heap memory block I use !heap -x -v 0bdd00c0 which returns Entry User Heap Segment Size PrevSize Unused Flags ----------------------------------------------------------------------------- 0bdd00b8

How to increase STS (Spring Tool Suite) memory size?

Deadly 提交于 2019-12-23 09:48:16
问题 I am trying to increase heap size (memory) for the spring tool suite as I am getting out of memory. If I increase from Xmx from 768m to 1024m I get the error "Failed to Create Java Virtual Machine". If I revert Xmx to 768m it works fine but I get OOM (Out of Memory). I have STS 2.9.2. OS is win7. This is currently what I have in sts.ini at the moment. -startup plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32

ESP8266 Fails to add char to a very long String (>8000 chars)

為{幸葍}努か 提交于 2019-12-23 04:24:59
问题 After correctly getting the payload from an HTTPS request, adding the client's chars to a String stops after about 8000 characters, then resumes and stops again a few times Here's a snippet of my code: long streamSize = 0; Serial.println("Now reading payload..."); while (stream.connected()) { while (stream.available() > 0) { char ch = (char)stream.read(); Serial.println((String)"Reading [" + ++streamSize + "] " + ch); ret += ch; Serial.println(ret.length()); } } Which works fine, until:

Which scenario is lighter/heavier on heap allocations?

妖精的绣舞 提交于 2019-12-23 03:54:26
问题 As a follow-up to a previous answer to another question, I became curious of how heap allocations work in a loop. Take the following two scenarios for example: Declaration: SomeList: TObjectList<TSomething>; Scenario 1: begin for X := 1 to 10 do SomeList[X].DoSomething; end; Scenario 2: var S: TSomething; begin for X:= 1 to 10 do begin S:= SomeList[X]; S.DoSomething; end; end; Now what I'm curious about is how heap allocations work in either scenario. Scenario 1 is directly calling the list

Frequent full GC with empty heap

前提是你 提交于 2019-12-23 03:46:10
问题 I've got a GC log file that shows frequent full GC when the heap is empty (every 30 mins initially, then 20, 10, 5 up to few events a minute. At some point, though, I can see a sudden increase in the heap usage (I'd imagine at the moment when users start connecting to my application) and full GC events start to take place less freqently. I can't think of a reason why this may happen. I'm using Oracle Vm 1.6, and my startup script is: java -XX:+HeapDumpOnOutOfMemoryError \ -Xmx7500m \ -XX

Unable to increase heap size for JMeter on Mac OSX

99封情书 提交于 2019-12-23 02:17:39
问题 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

Process Heap Segments And Their Necessity

自闭症网瘾萝莉.ら 提交于 2019-12-22 10:27:58
问题 While dumping heap of a win32 processes (Mostly in process which has high heap memory consumption like IE ) using !heap -a 004e0000 I find multiple segments of a particular heap like , Heap entries for Segment00 in Heap 004e0000 Heap entries for Segment01 in Heap 004e0000 Heap entries for Segment02 in Heap 004e0000 My questions are Question 1. Why its necessory to divide single heap into multiple segments ? Question 2. Most of the times I find a large gap between two segments. For example in