Memory is encoded, stored, and retrieved through processes. Encoding allows external information to reach our senses. Memory allocation involves setting aside space, such as allocating hard drive space for an application. It places blocks of information in memory systems. To allocate memory, the memory management system tracks available memory and allocates only what is needed, keeping the rest available. If insufficient memory exists, blocks may be swapped. Static and dynamic allocation methods exist, with dynamic using nonpreemptive and preemptive allocation. Nonpreemptive allocation searches memory for available space for a transferring block. Preemptive allocation more efficiently uses memory through compaction. Different memory types store executable code, variables, and dynamically sized structures, with heap memory