Top "Memory" questions

Use this tag for memory management or issues in programming.

Does stack grow upward or downward?

I have this piece of code in c: int q = 10; int s = 5; int a[3]; printf("Address of a: %d\n", (…

c memory stack
Memory Allocation/Deallocation?

I have been looking at memory allocation lately and I am a bit confused about the basics. I haven't been …

c++ memory allocation memory-management
Decoding bitmaps in Android with the right size

I decode bitmaps from the SD card using BitmapFactory.decodeFile. Sometimes the bitmaps are bigger than what the application needs …

android memory bitmap sd-card
When should I use malloc in C and when don't I?

I understand how malloc() works. My question is, I'll see things like this: #define A_MEGABYTE (1024 * 1024) char *some_memory; size_…

c memory memory-management
Reducing memory usage of .NET applications?

What are some tips to reduce the memory usage of .NET applications? Consider the following simple C# program. class Program { …

c# .net optimization memory memory-optimization
memory_get_peak_usage() with "real usage"

If the real_usage argument is set to true the PHP DOCS say it will get the real size of …

php memory memory-management
translate virtual address to physical address

The following page table is for a system with 16-bit virtual and physical addresses and with 4,096-byte pages. The reference …

memory memory-management operating-system virtual
A way to determine a process's "real" memory usage, i.e. private dirty RSS?

Tools like 'ps' and 'top' report various kinds of memory usages, such as the VM size and the Resident Set …

linux macos memory memory-management freebsd
How to determine the memory footprint (size) of a variable?

Is there a function in PHP (or a PHP extension) to find out how much memory a given variable uses? …

php memory
Android memory types (RAM v Internal Memory)

On a separate thread I demonstrated my ignorance of memory types by asking about the best way to copy a …

android memory storage ram