+ if (string)
+ {
+ memset(string, 0, sizeof(memcached_string_st));
+ string->is_allocated= MEMCACHED_NOT_ALLOCATED;
+ }
+ else
+ {
+ string= (memcached_string_st *)malloc(sizeof(memcached_string_st));
+ if (!string)
+ return NULL;
+ memset(string, 0, sizeof(memcached_string_st));
+ string->is_allocated= MEMCACHED_ALLOCATED;
+ }
+ string->block_size= MEMCACHED_BLOCK_SIZE;
+ string->root= ptr;
+
+ rc= memcached_string_check(string, initial_size);
+ if (rc != MEMCACHED_SUCCESS)
+ {
+ free(string);