Top "Memory-layout" questions

Struct memory layout in C

I have a C# background. I am very much a newbie to a low-level language like C. In C#, struct's …

c struct memory-layout
Finding the address range of the data segment

As a programming exercise, I am writing a mark-and-sweep garbage collector in C. I wish to scan the data segment (…

c memory-management garbage-collection global-variables memory-layout
How does a memory map of a Windows process look like?

This might be a duplicate question. I wish to know how the memory map of a windows process look like? …

windows memory-management low-level memory-layout
Object layout in case of virtual functions and multiple inheritance

I was recently asked in an interview about object layout with virtual functions and multiple inheritance involved. I explained it …

c++ multiple-inheritance vtable virtual-inheritance memory-layout
Overwrite return address simple format string exploit

Yes, quite a few similar questions exist already (5037601, 19166698, 4855162, 14505995, 5052648, 13409508, 7745146, 7459630; sorry, not enough rep for more than 2 links), and yes, there are …

c exploit memory-layout
Why is the ELF entry point 0x8048000 not changeable with the "ld -e" option?

Following up Why is the ELF execution entry point virtual address of the form 0x80xxxxx and not zero 0x0? …

linker elf memory-layout
Virtual tables and memory layout in multiple virtual inheritance

Consider following hierarchy: struct A { int a; A() { f(0); } A(int i) { f(i); } virtual void f(int i) { cout &…

c++ multiple-inheritance vtable virtual-inheritance memory-layout
Get the size (in bytes) of an object on the heap

I'm aware you can use MemoryLayout<T>.size to get the size of a type T. For example: …

swift heap-memory dynamic-allocation memory-layout