realloc.c

The libc implementation

Author

Martin ‘Solar’ Baute

License

Public Domain

Summary
realloc.cThe libc implementation
Todo’s
Primitive placeholder.  Improve.
Functions
reallocAttempts to resize the allocated block of memory given in ptr.

Todo’s

Primitive placeholder.  Improve.

Functions

realloc

void * realloc(void *ptr,
size_t size)

Attempts to resize the allocated block of memory given in ptr.  Resizes the memory to size bytes, or allocates a block of memory and copy the original contents to the new area.

Returns a pointer to the new location in memory.

Returns NULL if the memory could not be resized.

void * realloc(void *ptr,
size_t size)
Attempts to resize the allocated block of memory given in ptr.