I wrote the below code , and i want to realize how much space i have totally reserved but if i use sizeof(p) it only returns the size of my pointer. how can i get 2000 ?
void main(void){
int *p = (int * ) malloc(sizeof(int) * 1000 ) ;
//...The rest of the code comes here
p = ( int * ) realloc ( sizeof(int) * 2000 ) ;
// what function should i call with p in order to get
// the size of the reserved space that p is pointing to ????
}