realloc functions from RequestHandler