Commit e7f8d6af authored by Pekka Pessi's avatar Pekka Pessi
Browse files

Setting suh_size of cloned home structures.

darcs-hash:20050912153920-65a35-e49b5901c57cec6dc1818fb29e97283b33bf1fa3.gz
parent 8c69cfdc
...@@ -422,7 +422,8 @@ void *sub_alloc(su_home_t *home, ...@@ -422,7 +422,8 @@ void *sub_alloc(su_home_t *home,
subhome->suh_blocks = su_hash_alloc(SUB_N); subhome->suh_blocks = su_hash_alloc(SUB_N);
if (!subhome->suh_blocks) if (!subhome->suh_blocks)
return (void)free(data), NULL; return (void)free(data), NULL;
subhome->suh_size = size;
subhome->suh_blocks->sub_parent = home; subhome->suh_blocks->sub_parent = home;
} }
...@@ -465,6 +466,7 @@ void *su_home_new(int size) ...@@ -465,6 +466,7 @@ void *su_home_new(int size)
home = calloc(1, size); home = calloc(1, size);
if (home) { if (home) {
home->suh_size = size;
home->suh_blocks = su_hash_alloc(SUB_N); home->suh_blocks = su_hash_alloc(SUB_N);
if (home->suh_blocks) if (home->suh_blocks)
home->suh_blocks->sub_ref = 1; home->suh_blocks->sub_ref = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment