Comment by oh_sigh

12 years ago

In the case of disadvantage #1: s = sdscat(s,"Some more data");

You could fix that by adding a "remote pointer" header field. Inside of sdscat, you would allocate a new sds struct, and set the remote pointer header field in `s` to the new sds structs location. You could also try to do a realloc and maybe youll get the same starting pointer back again.