Simulated Heap Memory Layout (Splattered Allocation)
Stack is NULL (Empty)
No allocated nodes in heap. Enter a value and click "Push Node".
Why Linked-List Stack instead of Contiguous Array?
In standard C, an array stack requires fixed pre-allocation or contiguous realloc() calls that can fail when memory fragmentation occurs. A linked-list stack allocates arbitrary 16-byte chunks (8-byte pointer + 4-byte payload + padding) scattered at non-contiguous hexadecimal heap addresses, linked strictly through next pointers. Push and Pop are strictly O(1) operations requiring zero memory shifting.