heap

Android SoundPool heap limits

无人久伴 提交于 2019-12-24 04:42:07
问题 I am using a SoundPool to load several sound clips into and play them back. It is functioning 100% correctly from what I can tell. But during the .load() calls I am getting my log spammed with: 06-09 11:30:26.110: ERROR/AudioCache(23363): Heap size overflow! req size: 1050624, max size: 1048576 I am loading in 11 sound files, of those 2 are very small ~3kb and the rest are between 10kb - 15kb. Windows is reporting Size: 114kb Size on disk: 128kb Am I pushing the limits of what SoundPool is

getaddrinfo addrinfo result in stack or heap

假如想象 提交于 2019-12-23 21:52:11
问题 I am a bit confused at least. getaddrinfo() call 'updates' a pointer to a addrinfo struct, all is well when I am going to use the addrinfo in the same scope (that function) but what happens if I copy the struct to another one (by assigning it). Please help me understand the undergoing basics (not seeking advice for alternative approaches). Correct me if I am wrong: a) getaddrinfo() requires a pointer to struct-pointer to addrinfo. b) getaddrinfo creates a addrinfo struct in the current

MinMax Heap implementation without an array

岁酱吖の 提交于 2019-12-23 21:51:18
问题 I found lots of MinMax Heap implementations, that were storing data in an array. It is realy easy to implement, that is way I am looking for something different. I want to create a MinMax Heap using only elements of the Heap with pointers to left child and right child (and afcourse a key to compare). So the Heap have only pointer to the root object (min level), and a root object have a pointer to his children (max level) and so on. I know how to insert a new object (finding a proper path by

Is there any way to handle Java heap space exception [duplicate]

£可爱£侵袭症+ 提交于 2019-12-23 16:50:36
问题 This question already has answers here : How to deal with “java.lang.OutOfMemoryError: Java heap space” error? (19 answers) What is an OutOfMemoryError and how do I debug and fix it (4 answers) Closed 4 years ago . I am looking to convert file input stream for big file (The file is of 100MB) and it is throwing and java.lang.OutOfMemoryError : Java Heap space import java.io.FileInputStream; import java.io.IOException; import org.apache.commons.io.IOUtils; public class TestClass { public static

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

C++ Arguments Heap vs Stack

戏子无情 提交于 2019-12-23 09:26:26
问题 Suppose I create two vectors, one on the heap and one on the stack: Vector<int> vector1; Vector<int>* vector2 = new Vector<int>; I then pass vector1 into two functions, say, foo1(Vector<int>) and foo2(Vector<int>&) . I also pass vector2 into foo3(Vector<int>*) . Since I'm new to C++, I'm rather confused by the difference in behaviours here. Am I right to say that for foo1 , the entire vector1 gets copied, and for foo2 , only the reference to vector1 gets passed into the function? But isn't

C++ - Allocating memory on heap using “new”

假如想象 提交于 2019-12-23 08:18:06
问题 If I have the following statement: int *x = new int; In this case, I have allocated memory on the heap dynamically. In other words, I now have a reserved memory address for an int object. Say after that that I made the following: delete x; Which means that I freed up the memory address on the heap. Say after that I did the following again: int *x = new int; Will x point to the same old memory address it pointed to at the heap before it was deleted? What if I did this before delete : x = NULL;

changing jvm heap size - jgrasp

*爱你&永不变心* 提交于 2019-12-23 05:17:14
问题 I know how to increase java heap size on command line using flag -Xmx, I need to run my program in jgrasp, how do I increase the heap size for my program in that IDE? System.out.println("---->"+Runtime.getRuntime().maxMemory()); prints ---->66650112 on adding flag -Xmx256m the heap size still print the same number 回答1: Even when you pass -Xmx256m , it doesn't mean that the JVM is going to allocate that amount right away. -Xmx specifies the max heap. The JVM will wait to allocate more heap up

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

Sonar java.lang.OutOfMemoryError: PermGen space

血红的双手。 提交于 2019-12-23 03:22:25
问题 I'm getting the following error when running a build in ant buildcallbacks.xml:39: org.sonar.runner.RunnerException: java.lang.OutOfMemoryError: PermGen space It's the part of the build where sonar runs over our code. Is there a way for me to know exactly where this error is coming from i.e is it the sonar server or the client etc ? Here is line 39 of my buildcallbanks.xml <sonar:sonar /> EDIT: I've tried increasing the permsize from the wrapper.conf within Sonar and I still get the same