For example I've allocated memory for char *str:
str = ngx_pnalloc(r->pool, len1);
Then I've added some data to "str":
ngx_sprintf(str, "abc");
How should I reallocate this memory? Should I use:
str = ngx_pnalloc(r->pool, len2);
? And I would like to keep the str's "abc" data as well.
str = ngx_pnalloc(r->pool, len1);
Then I've added some data to "str":
ngx_sprintf(str, "abc");
How should I reallocate this memory? Should I use:
str = ngx_pnalloc(r->pool, len2);
? And I would like to keep the str's "abc" data as well.