Top "Memory-management" questions

Process of dynamically allocating and freeing portions of physical memory in order to respond to program requests with, if possible, fairness and no starvation among the requesters.

Calculate size of Object in Java

I want to record how much memory (in bytes, hopefully) an object takes up for a project (I'm comparing sizes …

java memory memory-management data-structures
How do I discover memory usage of my application in Android?

How can I find the memory used on my Android application, programmatically? I hope there is a way to do …

java android memory memory-management
Difference between static memory allocation and dynamic memory allocation

I would like to know what is the difference between static memory allocation and dynamic memory allocation? Could you explain …

c memory memory-management dynamic-memory-allocation static-memory-allocation
How to set the maximum memory usage for JVM?

I want to limit the maximum memory used by the JVM. Note, this is not just the heap, I want …

java memory memory-management memory-leaks profiling
What is private bytes, virtual bytes, working set?

I am trying to use the perfmon windows utility to debug memory leaks in a process. This is how perfmon …

debugging memory-leaks operating-system memory-management
Is there a way to delete created variables, functions, etc from the memory of the interpreter?

I've been searching for the accurate answer to this question for a couple of days now but haven't got anything …

python memory-management dir
In what cases do I use malloc and/or new?

I see in C++ there are multiple ways to allocate and free data and I understand that when you call …

c++ memory-management malloc new-operator
Does delete on a pointer to a subclass call the base class destructor?

I have an class A which uses a heap memory allocation for one of its fields. Class A is instantiated …

c++ memory-management destructor delete-operator base-class
'System.OutOfMemoryException' was thrown when there is still plenty of memory free

This is my code: int size = 100000000; double sizeInMegabytes = (size * 8.0) / 1024.0 / 1024.0; //762 mb double[] randomNumbers = new double[size]; Exception: Exception of type 'System.…

c# memory-management out-of-memory
Can a local variable's memory be accessed outside its scope?

I have the following code. #include <iostream> int * foo() { int a = 5; return &a; } int main() { int* p = …

c++ memory-management local-variables dangling-pointer