Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

No, the memory allocated to the pointer cannot be determined without having to search for the malloc statement or any similar dynamic memory allocation function for that specific pointer. The memory allocated size is determined at runtime and is dependent on the arguments passed to the dynamic memory allocation function. Therefore, it is essential to locate the corresponding dynamic memory allocation function to determine the size of the allocated memory for a specific pointer.