Why Nothing Matters: The Impact of Zeroing
Memory safety defends against inadvertent and malicious misuse of memory that may compromise program correctness and security. A critical element of memory safety is zero initialization. The direct cost of zero initialization is surprisingly high: up to 12.7%, with average costs ranging from 2.7 to 4.5% on a high performance virtual machine on IA32 architectures. Zero initialization also incurs indirect costs due to its memory bandwidth demands and cache displacement effects. Existing virtual machines either: minimize direct costs by zeroing in large blocks, or minimize indirect costs by zeroing in the allocation sequence, which reduces cache displacement and bandwidth.