heap-memory

file too large for eclipse

耗尽温柔 提交于 2019-12-11 00:26:00
问题 So... I was generating queries and then I pastes one particularly long one into eclipse, eclipse encountered a heap error and then crashed. I thought, no big deal, I can just go back in and delete a bunch, except for... every time I try to look at the file now eclipse will just crash. Either a heap error or a gc overhead limit error. I plan on just deleting this from outside eclipse, but I really want to know if there are any clever ways of attacking this problem. It's less than 14 megs, and

If I make a struct and put it in a vector, does it reside on the heap or the stack?

懵懂的女人 提交于 2019-12-10 23:14:42
问题 I'm writing some code that generates a vector of geometric elements: struct Geom_Entity { // a bunch of geometric information, // like tangent planes, force vectors, etc } The code is parsing many of these entities from a text file (for e.g.) so we have a function currently: parse_Geom(x: String) -> Vec<Geom_Entity> { // a bunch of code } These geometric entities are large structs with 17 f64 s and a few other fields. The file may contain well over 1000 of these, but not so many that they can

Java heap space with GSON

半城伤御伤魂 提交于 2019-12-10 20:58:42
问题 I'm creating some big JSON file using GSON to create custom JSON from GTFS (Google Transit). The problem is when I'm converting from my object class to JSON: Gson gson = new Gson(); String rutasJSON = gson.toJson(my_object); It gives this exception: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown

Haskell (ghc) runtime memory usage or what do I do wrong

江枫思渺然 提交于 2019-12-10 18:27:07
问题 I wrote a small program, kind of specialized HTTP server in haskell, which is not much more complex than the code below. What puzzles me is its memory consumption. Say, when I run a test compiled from the enclosed code and make several POST requests containing up to 20Mb body whole program will have VM size of ~800Mb and this sounds odd. And this space is not returned to system if I leave an instance of such program running idle. What does this mean? import System.IO import Network.HTTP

Heap Space Issue while Running a Pig Script

半世苍凉 提交于 2019-12-10 17:44:18
问题 I am trying to execute a pig script with around 30 million data and I am getting the below heap space error: > ERROR 2998: Unhandled internal error. Java heap space > > java.lang.OutOfMemoryError: Java heap space > at java.util.Arrays.copyOf(Arrays.java:2367) > at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130) > at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114) > at java.lang.AbstractStringBuilder.append

Android grow heap - should I worry?

笑着哭i 提交于 2019-12-10 17:23:20
问题 I've read something about an application having 16MB of memory "reserved" when it's on front. At least, as a developer I should count on this, even though depending on the device it may be more. I'm supporting down to 2.2 froyo, so many devices will not be high-end devices. I get some messages in Logcat saying this: 03-29 14:08:51.570: I/dalvikvm-heap(19899): Grow heap (frag case) to 13.624MB for 200765-byte allocation What worries me is the 13MB. I don't know if my app may crash if it

Increasing the gradle heap size [duplicate]

妖精的绣舞 提交于 2019-12-10 17:01:39
问题 This question already has answers here : To run dex in process, the Gradle daemon needs a larger heap. It currently has approximately 910 MB (13 answers) Closed 3 years ago . Whenever I try to make the build of the app , gradle takes too much of time and there comes a message showing that you should increase the Gradle size to 3072 MB , currently it is 910 MB . so my question is how can I increase the heap memory of gradle ?? 回答1: Just add android { .... dexOptions { // Prevent OutOfMemory

initial Java heap size means?

北战南征 提交于 2019-12-10 16:32:20
问题 So i got a program who use Java heap -Xms5g -Xmx12g I have set the initial Java heap size to 5gb and MAX heap size to 12gb But when i look in task manager or resource monitor, My program is only using 400mb. So here are my questions: What does initial Java heap size means? How come if i set initial Java heap size to 5gb, i only see the RAM use on the program to 400mb, should it not be 5gb? As initial heap means minimum size right? 回答1: The -Xmx maximum heap size is the largest size the heap

Heap corruption detection tool for C++

狂风中的少年 提交于 2019-12-10 16:13:21
问题 Is there any tool to help me detect heap corruption in C++? I can't provide source code because it's a big project. I can use any tool that works with Visual Studio or with xcode. The tool should work fine with multithreading. The problem is not very common, it appears after a long time and only in very special cases(they were not detected precisely!). Thank you! EDIT: Thanks you all for your answers! I will test the tools and I will accept one answer after the tests. 回答1: Valgrind is the

Can we write a function in Haskell to measure the number of bytes that a string of n characters occupies?

血红的双手。 提交于 2019-12-10 16:07:09
问题 Suppose I have the string "abc" and I want to calculate the number of bytes it occupies in memory. I could do: import Data.Bits finiteBitSize ("abc" :: [Char]) but that breaks because [Char] is not a type supported by the function. (Also it is bits not bytes, but the point was to paint a picture of what I'm looking for). My question is: Can we write a function in Haskell to measure the number of bytes that a string of n characters occupies? 回答1: There's a Haskell package called ghc-datasize