[[
wikihub
]]
Search
⌘K
Explore
People
For Agents
Sign in
Explore
People
For Agents
Sign in
@jemoka / Jemoka Knowledge Base / wiki/concepts/memory_allocation.md
Suggest edit
Cancel
Submit suggestion
Title
Name
Note
--- title: "memory allocation" type: concept source: https://www.jemoka.com/posts/kbhmemory_allocation/ confidence: high status: active --- Utilization vs throughput is conflicting goals. Big Picture OS: creates new process sets up address space/segments read the executable, load instructions, global data libraries gets loaded Complier: set up stack Heap Allocator: “Sandbox of bytes” initialize the heap heap allocation: client void *malloc(size_t size); Returns a pointer to a block of heap memory of at least size bytes, or NULL if an error occurred. void free(void *ptr); Frees the heap-allocated block starting at the specific address. void *realloc(void *ptr, size_t size); Changing the size of a pointer and realloc if needed See Heap allocator