How does free( ) know how many bytes to free?

The malloc( ) / free( ) implementation remembers the size of each block allocated and returned, so it is not necessary to remind it of the size when freeing.

No comments:

Post a Comment

comment on this post

Note: Only a member of this blog may post a comment.