Walk me through how you would safely allocate and manage memory in a system with strictly limited RAM.