Most voted "memory" questions
This tag is to be used with memory problems in programming. DO NOT use the tag for memory installation problems or any non-programming related subject. If the problem is memory management have a tag just for this.
Learn more…332 questions
Sort by count of
-
217
votes4
answers41133
viewsWhat are they and where are the "stack" and "heap"?
What are these such stack and heap that so much is said about memory management? This is actually portions of memory as some people speak or is just an abstract concept to facilitate understanding…
-
37
votes3
answers439
viewsHow to get a similar behavior between the Garbage Collection of a Single-Page Application and a Multiple-Page Application?
I’ve been doing a lot of research on the web and in stackoverflow communities, and I’m getting to the point of believing that Spas take almost no advantage of the GC algorithm of current browsers.…
javascript memory memory-management single-page-application memory-leaksasked 7 years, 6 months ago LeonanCarvalho 3,527 -
33
votes1
answer522
viewsDoes the size of a function affect memory performance and consumption?
Does the fact that a function is higher or lower affect the performance of the application? Especially in PHP. If you need performance, it would be better to perform large or small? And memory…
-
32
votes4
answers5405
viewsStrategies to analyze very large databases in R (that do not fit in RAM)
Suppose I have a huge database that doesn’t fit in RAM. What strategies to analyze this database in R, since I cannot load it entirely into memory? PS: The question isn’t just about how to get R to…
-
30
votes1
answer1625
viewsWhen does Stack Overflow occur?
A question that has everything to do with the name of this site. We know that one of the most commonly used examples to demonstrate the execution stack of a program is recursion. A recursive…
-
29
votes1
answer7393
viewsWhy does Java consume so much memory?
I wrote this little program in Java to download images of a thread in a imageboard: public class FourChanThreadImageDownloader { private static void usage() { System.out.println("java…
-
28
votes3
answers1436
viewsHow does method management work in C#memory?
In C# there is a clear distinction between value types (structs) and reference types (classes), this distinction being basically the way in which the CLR manages instances of each type. Value type…
-
26
votes5
answers1461
viewsIs it possible to code the size of the object in memory?
If I need to calculate the occupied space to make any decision has how to figure out the size that each type takes to check how much memory will be occupied if I allocate multiple instances of it?…
-
23
votes1
answer9539
viewsWhat is the difference between "calloc()" and "malloc()"?
What the function calloc() makes the malloc() Doesn’t it? Why is it hardly used?
-
22
votes3
answers1767
viewsWhat prevents an array from being initialized with a variable size in C?
Why does an array need to have a constant size? What prevents it from having a variable size?
-
21
votes2
answers3969
viewsWhat is Garbage Collector and how does it work?
What is Garbage Collector, how it works? When should we care about him?
-
20
votes3
answers4153
viewsWhy are local variables avoided in Arduino?
In several code examples for the Arduino I note that there is almost no use of variables in local scope. One of the examples present in the IDE: Analog > AnalogInput: int sensorPin = A0; int…
-
20
votes4
answers2408
viewsWhat is buffer overflow?
Whenever I use the function gets() the compiler returns me the following warning: Function is Dangerous and should not be used Translation: this function is dangerous and should not be used I hear a…
-
18
votes1
answer237
viewsStack and memory align operation in MASM X64
I have an application that takes a TAC code (IL) and generates an ASM code using x64 MASM. The problem is that I’m not having any compilation error, and yes, (at least that’s what I think) at the…
-
17
votes2
answers6315
viewsHeap of Java memory
I would like a simple explanation of what heap memory of JVM? I searched on Google but had no clear enough answer.
-
16
votes4
answers4778
viewsHow do value types and reference types work in Javascript?
I know that in C# there are value types and reference types and one of the differences between them is in memory management. What decides how the variables will behave is their type, so if it’s a…
-
16
votes3
answers1008
viewsHow is a class organized in memory?
According to this definition of memory: In computing, memory refers to the physical devices used to store programs (sequence of instructions) or data (State information, for example) in a character…
-
15
votes1
answer37878
viewsXms, Xmx, XX:Maxpermsize, XX:Permsize - What’s the difference?
I need to improve the performance and availability of my Glassfish application server that from time to time causes the application to launch Outofmemory error. Searching the internet, I checked…
-
15
votes2
answers4859
viewsWhat is von Neumann’s architecture?
How it works and why it has become the dominant computer model?
memory computer-science architecture-computers computer-theoryasked 7 years, 8 months ago Marcell Alves 2,453 -
15
votes1
answer193
viewsWhat is the minimum size of an object in memory?
I received an answer in my question that talks about a overhead that the object has. Every object has this overhead? An object without data also has this overhead? Exists object of size 0?…
-
15
votes2
answers1826
viewsHow is a program loaded into memory and then executed?
Imagine that I wrote a "hello world" in C. I compiled and generated an executable, then ran it. The result of the build is a binary, which is actually also a set of instructions that will be…
-
14
votes1
answer328
viewsHow does the Javascript garbage collector work?
Simple variables Correct me if I’m wrong, but in Java the garbage collector eliminates objects that are no longer referenced: Cliente cliente = new Cliente(); cliente = null; // o coletor de lixo…
-
14
votes2
answers2001
viewsDoes Delphi own a garbage collector?
Does Delphi have an automatic garbage collector? How does it work. If not, what tools can do this?
delphi memory memory-management garbage-collector object-pascalasked 9 years, 8 months ago Giovani 2,875 -
14
votes2
answers2384
viewschar[] or *char malloc?
What difference in C between char text[10] or char *char = (char *)malloc(10*sizeof(char)); What advantage of using malloc on a pointer?…
-
13
votes3
answers569
viewsWhat are the consequences of programming in 32 bits or 64 bits?
It would only be the memory capacity that is limited to 4 GB in 32 bits? I need to have specific concerns? I know what’s different about C, I want to know about C#.
-
13
votes2
answers6409
viewsWhat is a stream?
In both PHP and C#, languages I’ve been using in my day to day life, I’ve come across a common term: Stream. Whenever I hear the word Stream, the first thing that comes to mind is Youtube, among…
-
12
votes1
answer225
viewsDoes the name size of a variable affect your weight?
There’s a size difference between that: string packet1234 = "123"; And that? string packert1234556 = "123";
-
12
votes1
answer6642
viewsWhat is a memory dump?
What is a dump from memory? How it can help in the possible identification of an inconsistency in the code? How the analysis is performed?
-
12
votes1
answer9161
viewsWhat is Segmentation fault?
This error often occurs in code with problems. I don’t see it occurring in other languages. Why does it occur? What does it mean?
-
12
votes1
answer218
viewsHow does "free()" know how much memory it has to release?
When we use the malloc() we say how many bytes we need. But free() we do not say. How he knows how much he needs to be released?
-
11
votes3
answers1211
viewsConcepts of Mesomorphic Allocation and Liberation in C#
I’m making a web application that has a finite recursive loop. But during the process the memory consumption is constantly growing and at the end Visual Studio has more than 2 Gigas of memory use. I…
-
11
votes2
answers462
viewsHow to allocate dynamically when I don’t know how many positions I will use in C?
In a part of the code I need to transform an integer into binary and store it in a character array, however, I don’t know which integer I will receive to transform into binary, so I don’t know how…
-
11
votes1
answer1648
viewsDifference between method and constructor?
Reading a friend’s notes I came across the following statement: "method does not allocate space in memory". This statement is correct? It may not be the main difference between them, but it is…
-
11
votes2
answers536
viewsExternal and internal memory sorting algorithms
I was researching the difference between memory sorting algorithms external and internal and found the following answer in Quora : "In cases where we have to classify more data than can fit into…
-
11
votes1
answer4142
viewsWhat is page fault?
I was reading the reply of the user Maniero regarding overlay and memory management. He cited the page fault which can occur when a program is running. However, this term page fault caused me some…
-
11
votes2
answers811
viewsWhat is memory segmentation?
I read about memory segmentation, however, I cannot understand what memory segmentation is and how it influences the functioning of my program. Illustration See this example of a program that…
-
11
votes2
answers440
viewsDoes any programming language use memory?
When I write a program in any programming language, compiled or interpreted, is it necessary to run a RAM? Please explain. Being more specific, I made a text editor using Javascript. When this text…
-
10
votes1
answer292
viewsScala memory leak and processes (memory Leak)
I have a fairly complex system in Scala, with multiple threads and simultaneous system calls. This system is having some problem, because busy memory grows over time. The image below shows the…
-
10
votes3
answers42472
viewsError Segmentation fault (core dumped)
I’m getting the following error message in my code: Segmentation fault (core dumped) Another thing is, when I performed the same function operation preenche in the main, using ficha.name in place of…
-
10
votes3
answers540
viewsWhat kind of smart pointer to choose?
How to know what kind of smart pointer to use? And what’s the difference between them? Example: std::unique_ptr<MinhaClasse> mClasse(new MinhaClasse) std::shared_ptr<MinhaClasse>…
-
10
votes2
answers158
viewsWhat happens to memory when "realloc()" reallocates a memory block to a value less than the original?
Suppose I allot a dynamic matrix of 10 ints and assign some values values to it, then I use the function realloc() to reallocate the matrix to 3 ints, what happens to the other 7 ints, they will be…
-
9
votes1
answer2493
viewsWhat are logical operators and how do bit-to-bit operations work in the C language?
What are logical operators NOT, AND, OR, XOR, in language C? Nor did I understand these operators: ~, &, |, ^, >>, << and the result in bits. I have the following example of code:…
-
9
votes1
answer325
viewsIn C++ where are the functions of the objects in memory?
In C++ when an object is declared, class variables are stored in the stack or in the heap depending on how the object was created. With the operator sizeof() it is possible to test and realize that…
-
9
votes4
answers2583
viewsCan PHP’s unset() function improve performance?
I think the answer to my question would be "yes." even because I end up doing it in my code (when I remember), but I just stopped to think about it now and I’m kind of worried if someone asked me…
-
9
votes1
answer126
viewsA property occupies space in the object?
I was reading a question about properties and saw that she is at the same time one or two methods. Do you have any additional cost in memory and processing in using it? If you don’t use the code you…
-
9
votes1
answer1028
viewsWhat is the maximum number of items I can put inside a List<T> in C#?
I have several questions of performance in my application. What is the maximum number of items I can within my List<T> and what is "acceptable" within good practice.
-
9
votes2
answers1582
viewsWhat is the difference in the syntax ptr = (int*) malloc (sizeof(int)) and ptr = malloc (sizeof(int))?
I have a question about dynamic allocation in C. At the time of allocating memory I have seen these two types of syntax: ptr = (int*) malloc (sizeof(int)); ptr = malloc (sizeof(int)); But I don’t…
-
8
votes2
answers193
viewsHow does a variable point to a pointer?
Reading this answer on pointers and arrays in C, there is the example below where the variable ptr points to the first element of this array. int array[42] = {42}; int *ptr = a; How this pointer…
-
8
votes1
answer460
viewsHow to allocate a member of a struct to C?
I wonder if it is possible to allocate a atributo of a struct, follows my struct example: struct MinhaStructExemplo { int * atributo_quantidade; /*Atributo que eu gostaria de alocar na memoria*/ };…
-
8
votes2
answers577
viewsWhat is the purpose of unsafe command?
I saw the use of the command unsafe, in this code in the declaration of this method: public unsafe static int GetSquareStack(int value) {...} Within the method there seems to be pointer manipulation…