Using this simple algorithm when you append a character into a string will reduce calls to [m|re|c]alloc...I want to implement this algorithm to make a simple memory pool. But the problem is, when I use realloc, the returned memory address might be changed is possible...Code:typedef struct { char *value; size_t length; size_t allocated; } string; void str_append(string *str, char c) { if((str->length + 2) > str->allocated) { str->allocated += 255; str->value = realloc(str->value, str->allocated); } str->value[str->length] = c; str->value[++(str->length)] = 0; }It seems the pseudocode above is impossible.Code:function pool_request(MemoryPool pool_obj, number size) if pool_obj.length + size > pool_obj.allocated pool_obj.allocated += 255 pool_obj.allocation = realloc(pool_obj.allocation, pool_obj.allocated) end if pool_obj.length += size return pointer operation:(pool_obj.allocation + (pool_obj.length - size)) end function