heap-memory Questions

4

Solved

In C I can initialize an array on the stack like so: SOME_DATA_TYPE* x = (SOME_DATA_TYPE[5]) {v1, v2, v3, v4, v5}; Is there a similar one-line method to assign values to a malloc()-ed array on t...
Houri asked 27/7, 2016 at 19:15

2

In some use case, you'll need to allocate storage before creating objects inside this storage. Then in order to create these objects, you may need to use placement new: T *pobj = new(pstorage); ye...

12

I am facing below OutOfMemor errors, and JMeter stops working.... java.lang.OutOfMemoryError: Java heap space Dumping heap to java_pid4412.hprof ... Heap dump file created [591747609 bytes in 71...
Hyetograph asked 18/2, 2010 at 6:34

1

If I run eslint . from my project-root, it prints all errors and warnings to the console, as I would expect it to. However, when I cd into a subdirectory of the project, eslint . yields the followi...
Countermark asked 25/8, 2022 at 9:49

3

Solved

I was playing with OOM errors today and I found something I can't explain myself. I try to allocate an array bigger than the heap, expecting a "Requested array size exceeds VM limit" erro...
Slipsheet asked 13/10, 2020 at 16:16

16

Solved

I have class Foo { .... } Is there a way for Foo to be able to separate out: function blah() { Foo foo; // on the stack } and function blah() { Foo foo* = new Foo(); // on the heap } I ...
Mckoy asked 13/1, 2010 at 5:47

4

Solved

Now I am using node.js in paas platform. And the container has memory limit. Now I want to get the maximum of the heap size of node.js application. I know that use the parameter "--max-old-space-si...
Bleeding asked 29/10, 2015 at 15:54

3

When I try to generate SQL data from a DB2 database, I am getting Java Heap space issue. There are around 25 tables with approx 1000 records. I use the below scripts in generating the changeset d...
Groundage asked 6/9, 2013 at 18:48

36

Solved

Today I ran my script for filesystem indexing to refresh RAID files index and after 4h it crashed with following error: [md5:] 241613/241627 97.5% [md5:] 241614/241627 97.5% [md5:] 241625/241627...
Nastassia asked 25/7, 2016 at 2:45

14

Solved

I am working on a Windows 2003 server (64-bit) with 8 GB RAM. How can I increase the heap memory maximum? I am using the -Xmx1500m flag to increase the heap size to 1500 Mb. Can I increase the heap...
Clad asked 14/10, 2009 at 10:12

32

Solved

I am writing a client-side Swing application (graphical font designer) on Java 5. Recently, I am running into java.lang.OutOfMemoryError: Java heap space error because I am not being conservative o...
Mezereum asked 1/9, 2008 at 1:10

8

Solved

As of raising this question, Docker looks to be new enough to not have answers to this question on the net. The only place I found is this article in which the author is saying it is hard, and that...
Negotiation asked 28/4, 2015 at 15:25

10

I am currently developing an admin panel using 'react-admin' which works well on my local, but as soon as I upload the app to Heroku, the build fails with the following error: "FATAL ERROR: Ineffec...
Selvage asked 6/12, 2019 at 1:14

4

I have been experiencing this for some days now. As I start working in my Vs Code, the terminal server, will suddenly stop working, showing the error message attached in the screenshot. Please does...

20

Solved

I stumbled upon Stack Overflow question Memory leak with std::string when using std::list<std::string>, and one of the comments says this: Stop using new so much. I can't see any reason you ...
Mckenzie asked 28/6, 2011 at 0:8

24

Solved

I get this error message as I execute my JUnit tests: java.lang.OutOfMemoryError: GC overhead limit exceeded I know what an OutOfMemoryError is, but what does GC overhead limit mean? How can I sol...
Hightail asked 8/9, 2009 at 11:34

8

Solved

I have a production server running with the following flag: -XX:+HeapDumpOnOutOfMemoryError Last night it generated a java-38942.hprof file when our server encountered a heap error. It turns out t...
Gushy asked 9/10, 2008 at 4:4

3

Solved

the prototype of the function ctime is char *ctime(const time_t *timep); As we can see, it return a string. but, where the sting be contained? and why we shouldn't free the string's memory Thi...
Reasoning asked 29/6, 2012 at 7:29

7

I have an array declaration like this: int a[]; Here a is an array of primitive int type. Where is this array stored? Is it stored on heap or stack? This is a primitve type int, all primitive ty...
Longoria asked 20/1, 2010 at 7:29

3

Solved

I am looking to log all accesses to addresses in a block allocated in heap, pointed by a given pointer. In the following example, it would be monitoring all accesses to 1024 bytes from p. #define B...
Tenure asked 6/9, 2023 at 22:10

2

Solved

Initially I was pretty sure that the correct answer had to be "None of them", since global variables are stored in the data memory, but then I've found this book from Robert Lafore, calle...
Aleutian asked 4/6, 2017 at 23:51

2

I have been working to overcome apparent memory leaks when running jest that are described here: https://github.com/facebook/jest/issues/7874 I would like to just give jest a whole bunch of heap sp...
Lockjaw asked 10/12, 2021 at 15:54

5

Solved

I'm working on a school project and the teacher asked us to free all resources at program's termination. I'm struggling to find a way to write more readable and/or less code to manage that, specifi...
Greatest asked 12/7, 2023 at 18:3

10

Solved

Ok so I understand about the stack and the heap (values live on the Stack, references on the Heap). When I declare a new instance of a Class, this lives on the heap, with a reference to this point...
Dipterocarpaceous asked 4/1, 2012 at 16:42

6

Solved

How will I free the nodes allocated in another function? struct node { int data; struct node* next; }; struct node* buildList() { struct node* head = NULL; struct node* second = NULL; struct...
Ebarta asked 20/6, 2011 at 20:34

© 2022 - 2024 — McMap. All rights reserved.