In C, as free() knows an array size, why isn't there a function that gets the array size? [closed]
- by user354959
Possible Duplicate:
If free() knows the length of my array, why can’t I ask for it in my own code?
Searching around (including here at stackoverflow), I got that malloc() allocates an array and also creates a header to control the array info.
In this header, there's also the array size. free() use such information to know how to deallocate…