For an allocation of that size, it&#x27;s likely that your system&#x27;s malloc is requesting the allocation directly from the OS&#x27;s virtual memory system with mmap(2), and freeing it with munmap(2), without ever actually writing a megabyte of zeros. Smaller allocations, however, are likely to require explicit clearing since they will hardly ever require a system call. (It depends on the details of your OS and malloc, of course.)