B
Blah
suppose we have:
ptr = malloc(LARGE_AMOUNT);
and the call to malloc is succesful (non-NULL return).
is there any possibility of a later call to realloc like this:
tmp = realloc(ptr,SMALLER_AMOUNT);
to return NULL?
IOW, is it possible for realloc to fail when used to *reduce* the size of an
allocated memory block?
ptr = malloc(LARGE_AMOUNT);
and the call to malloc is succesful (non-NULL return).
is there any possibility of a later call to realloc like this:
tmp = realloc(ptr,SMALLER_AMOUNT);
to return NULL?
IOW, is it possible for realloc to fail when used to *reduce* the size of an
allocated memory block?