Possible Duplicate:
Any function to query the size of an allocated block?
Getting the size of a malloc only with the returned pointer
Let us say that I let the user specify the number of bytes to be passed to an int *x using the malloc function. Is there a way to determine the actual number of bytes that were assigned to the integer?