Does malloc reserve more space while allocating memory?

Once free()-d, I am expecting program’s virtual memory (VIRT) consumption to be down by 1MB.

Well, this is not guaranteed by the C standard. It only says, once you free() the memory, you should not be accessing that any more.

Whether the memory block is actually returned to the available memory pool or kept aside for future allocations is decided by the memory manager.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)