Is there a way to know from a pointer the size with which malloc()
was called?
For example, if I have:
typedef struct entry entry_t;
struct entry
{
int val;
};
entry_t *entryt_p = (entry_t *)malloc(10 * sizeof(entry_t));
Is there a way I can extract from entryt_p
with which size malloc()
was called?