out-of-memory

java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)

别说谁变了你拦得住时间么 提交于 2019-12-23 10:06:57
问题 I am trying to perform an animation on a button click.. the steps are as follows on button click.. the button image changes an animation plays next layout is displayed.. But am getting an out of memory exception.. When the animation file was not added to the project there was no error. But since the addition of the anime there is the problem. I am using 3 class files here(home_screen, button_anime and home) home_screen.java receives the button click information, changes the button image and

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

Free ~> Trampoline : recursive program crashes with OutOfMemoryError

两盒软妹~` 提交于 2019-12-23 09:36:37
问题 Suppose that I'm trying to implement a very simple domain specific language with only one operation: printLine(line) Then I want to write a program that takes an integer n as input, prints something if n is divisible by 10k, and then calls itself with n + 1 , until n reaches some maximum value N . Omitting all syntactic noise caused by for-comprehensions, what I want is: @annotation.tailrec def p(n: Int): Unit = { if (n % 10000 == 0) printLine("line") if (n > N) () else p(n + 1) } Essentially

Does garbage collection happen immediately after Hashmap.remove() is called?

自古美人都是妖i 提交于 2019-12-23 09:25:10
问题 The Java code is as follows: Random r = new Random(1234697890); HashMap<Integer, List<Integer>> map = new HashMap<Integer, List<Integer>>(); List<Integer> list = new ArrayList<Integer>(); for(int i=0;i<100000;i++){ for(int j=0;j<1000;j++){ list.add(r.nextInt(100000)); } map.put(i, list); map.remove(i); } when i reaches 37553 , java.lang.OutOfMemoryError: Java heap space happens. It seems that garbage collection does not happen in the loop. Now I wonder how to fix the problem. 回答1: Try

OutOfMemoryException when creating multiple byte arrays

社会主义新天地 提交于 2019-12-23 09:19:24
问题 I'm constantly hitting an OutOfMemoryException inside a method that creates and processes some byte arrays. The code looks like this: Create MemoryStream to get some data (about 60MB). Create byte array (same size as MemoryStream, about 60MB) Fill the array with bytes from memory stream Close MemoryStream Process data from byte array Leave method When this method is called like 20-30 times I get OutOfMemoryException right where the byte array is allocated. But I don't think it's the system

C++/Windows: How to report an out-of-memory exception (bad_alloc)?

时间秒杀一切 提交于 2019-12-23 07:56:27
问题 I'm currently working on an exception-based error reporting system for Windows MSVC++ (9.0) apps (i.e. exception structures & types / inheritance, call stack, error reporting & logging and so on). My question now is: how to correctly report & log an out-of-memory error? When this error occurs, e.g. as an bad_alloc thrown by the new op, there may be many "features" unavailable, mostly concerning further memory allocation. Normally, I'd pass the exception to the application if it has been

string.split() “Out of memory exception” when reading tab separated file

十年热恋 提交于 2019-12-23 07:39:22
问题 I am using string.split() in my C# code for reading tab separated file. I am facing "OutOfMemory exception" as mentioned below in code sample. Here I would like to know why problem is coming for file having size 16 MB? This is right approach or not? using (StreamReader reader = new StreamReader(_path)) { //...........Load the first line of the file................ string headerLine = reader.ReadLine(); MeterDataIPValueList objMeterDataList = new MeterDataIPValueList(); string[] seperator =

ADsOpenObject() returns -2147024882 (0x8007000E) -> OUT_OF_MEMORY

寵の児 提交于 2019-12-23 07:28:30
问题 I have a C++ DLL that is used for authentication that gets loaded by a Windows service for every login. In that DLL I use the Windows ADSI function ADsOpenObject() to get a user object from Active Directory . HRESULT hr = ADsOpenObject(L"LDAP://rootDSE", L"username", L"password", m_dwADSFlags, IID_IDirectorySearch, (void**)&m_DSSearch); Generally this works since years. But currently I get the error code -2147024882 (0x8007000E) which is OUT_OF_MEMORY. When I restart the service that is using

How do you refill a byte array using SqlDataReader?

瘦欲@ 提交于 2019-12-23 06:24:14
问题 This is in reference to: byte[] and efficiently passing by reference And the SqlDataReader found in this post: Getting binary data using SqlDataReader Inside a loop, I'm calling a database and returning a large object ( varbinary[max] ). Currently, I'm running into OutOfMemory exceptions, so I'm trying to reduce the footprint in the Large Object Heap (LOH). So, I'm creating a byte array for the largest file that I'd download and adding some padding just in case. For instance: byte[]

How do you refill a byte array using SqlDataReader?

北战南征 提交于 2019-12-23 06:24:09
问题 This is in reference to: byte[] and efficiently passing by reference And the SqlDataReader found in this post: Getting binary data using SqlDataReader Inside a loop, I'm calling a database and returning a large object ( varbinary[max] ). Currently, I'm running into OutOfMemory exceptions, so I'm trying to reduce the footprint in the Large Object Heap (LOH). So, I'm creating a byte array for the largest file that I'd download and adding some padding just in case. For instance: byte[]