A somewhat faithful implementation of libc `realloc`.

        :param ptr:  the location in memory to be reallocated
        :param size: the new size desired for the allocation
        :returns:    the address of the allocation, or a NULL pointer if the allocation was freed or if no new allocation
                     was made

def realloc(self, ptr, size):
        """
        A somewhat faithful implementation of libc `realloc`.

        :param ptr:  the location in memory to be reallocated
        :param size: the new size desired for the allocation
        :returns:    the address of the allocation, or a NULL pointer if the allocation was freed or if no new allocation
                     was made
        """
        raise NotImplementedError("%s not implemented for %s" % (self.realloc.__func__.__name__,
                                                                 self.__class__.__name__))