The memory used and released back into the processes' pool may be getting slightly fragmented in the first circumstance. you can't use the same block of memory for the next task if there is still a portion in the middle that is still used, you have to request more. In the second method you may be freeing the entire block of memory to the pool so you do not notice the (probable) allocation.