tagged [heap-memory]

Local variables with Delegates

Local variables with Delegates This appears like it wouldn't be a best practice. Can someone explain why it would not be a best practice or how this works? Any books or articles providing an explanati...

13 Jun at 11:55

When is array allocated on stack in c#?

When is array allocated on stack in c#? I've been trying to figure out when things get allocated on stack and I can't figure out how would you make array (or rather values in it) get allocated on stac...

C# - Garbage Collection

C# - Garbage Collection 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 ref...

2 Jul at 21:27

java.lang.OutOfMemoryError: GC overhead limit exceeded

java.lang.OutOfMemoryError: GC overhead limit exceeded I am getting this error in a program that creates several (hundreds of thousands) HashMap objects with a few (15-20) text entries each. These Str...

10 Aug at 14:17

How to deal with "java.lang.OutOfMemoryError: Java heap space" error?

How to deal with "java.lang.OutOfMemoryError: Java heap space" error? I am writing a client-side application (graphical font designer) on . Recently, I am running into `java.lang.OutOfMemoryError: Jav...

24 Oct at 14:58

C: How to free nodes in the linked list?

C: How to free nodes in the linked list? How will I free the nodes allocated in another function? ``` struct node { int data; struct node* next; }; struct node* buildList() { struct node* head =...

20 Jun at 21:4

String assignment in C#

String assignment in C# A few weeks ago, I discovered that strings in C# are defined as reference types and not value types. Initially I was confused about this, but then after some reading, I suddenl...

10 Sep at 19:22

addressSanitizer: heap-buffer-overflow on address

addressSanitizer: heap-buffer-overflow on address I am at the very beginning of learning C. I am trying to write a function to open a file, read a `BUFFER_SIZE`, store the content in an array, then tr...

Why is MemoryPool slower and allocates more than ArrayPool?

Why is MemoryPool slower and allocates more than ArrayPool? I'm not entirely sure if I have done something wrong in my tests, but from my results MemoryPool is consistently slower and allocates more m...

4 Jun at 15:35

Where are all the static members stored?

Where are all the static members stored? I'm trying to learn how C# manages memory. I am stuck on static elements, I read numerous blogs and articles on this subject, but I cannot find a quite satisfa...

How to increase Java heap space for a tomcat app

How to increase Java heap space for a tomcat app There are lots of questions that ask this or a similar question. They all give the command that has to be executed, what I don't understand is where do...

27 Apr at 04:52

Do references get updated when Garbage Collectors move data in heap?

Do references get updated when Garbage Collectors move data in heap? I read that GC (Garbage Collectors) moves data in Heap for performance reasons, which I don't quite understand why since it is rand...

c# structs/classes stack/heap control?

c# structs/classes stack/heap control? so in c++ it's very easy. you want whatever class/struct to be allocated on the heap, use new. if you want it on the stack, don't use new. in C# we always use th...

Node.js heap out of memory

Node.js heap out of memory 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 ...