c realloc, what does size really mean
问题 Could someone explain what second parameter in realloc really is as I cant find a way to test it. So suppose that we have something like this int *p = malloc(sizeof(int)); //we have just enough space to store single int value now if I want to store 2 int values in p do I need to send to realloc as second parameter 2 * sizeof(int) new size of the block or sizeof(int) as it needs to extend memory for size of int In case I should send to realloc total value of new block in this case 2 * sizeof