Suppose I were to write the following code:

int *p = malloc(sizeof(int) * 10);
int *q;
q = p + 1;

Will calling free with argument q free up the entire block of "size" 10? Or will it only free up the 2nd through 10th spots?

Is there any circumstance in which memory that has been allocated using malloc is freed without explicitly calling free?

Thank you!