Home▸Computer Science▸Navigation Back-Stack & Memory Eviction Simulator (2D)

Navigation Back-Stack & Memory Eviction — 2D Stack View

Interactive 2D model of a mobile app's navigation back-stack: push and pop screens, watch the OS evict backgrounded screens once a memory budget is exceeded, and pay the real recreation cost when you back into an evicted screen. Drag to pan, scroll to zoom.

Computer Science2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-mobile-navigation-patterns ↗ Open standalone

Every mobile app's navigation is, underneath the tab bars and drawers, a LIFO back-stack of screens. This simulator makes the invisible half of that mechanism visible: push screens onto a 2D staircase-stack, set a memory budget, and watch the operating system evict backgrounded screens — furthest from the visible top first — once that budget is exceeded. Press Back into an evicted screen and pay the real cost mobile OSes pay: a recreation delay proportional to the screen's weight, tracked live alongside stack depth, live memory against budget, eviction count and average recreation cost. Push (singleTop) and Clear to root reproduce the exact dedup and stack-collapse patterns Android's launch modes and iOS's view-controller stack use in production. Drag to pan and scroll to zoom around the stack.

⚙ Under the hood

Push and pop screens on a 2D mobile navigation back-stack drawn as a receding staircase of cards, watch the OS evict backgrounded screens once a memory budget is exceeded, and pay the real recreation cost when you back into an evicted screen. Drag to pan, scroll to zoom.

mobilenavigationdata-structuresmemory-managementandroidux

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)