- void * krealloc(const void * p, size_t new_size, gfp_t flags);
- object to reallocate memory for.
- how many bytes of memory are required.
- the type of memory to allocate.
The contents of the object pointed to are preserved up to the lesser of the new and old sizes. If p is NULL, krealloc behaves exactly like kmalloc. If new_size is 0 and p is not a NULL pointer, the object pointed to is freed.