 <p>The specific addresses returned by malloc are selected by the implementation and not always optimal for the using code. You already know that the speed of moving memory around depends greatly on cache and page effects.</p> <p>Here, the specific pointers malloced are not known. You could print them out using <code>printf("%p", ptr)</code>. What is known however, is that using just one malloc for two blocks surely avoids page and cache waste between the two blocks. That may already be the reason for the speed difference.</p>