pike.git/
src/
stralloc.c
Branch:
Tag:
Non-build tags
All tags
No tags
2014-08-18
2014-08-18 16:06:58 by Arne Goedeke <el@laramies.com>
ca7685fb90adc4e436ee2fd4b684e3fdeb4fc2e8 (
9
lines) (+
7
/-
2
)
[
Show
|
Annotate
]
Branch:
arne/string_alloc
Strings: Readded handling for short string in add_string_status()
1127:
bytes_distinct_strings[key] += DO_ALIGN(p->len << p->size_shift, sizeof(void *)); alloced_strings[key] += p->refs;
+
if (string_is_short(p)) {
alloced_bytes[key] += p->refs*DO_ALIGN((p->len+3) << p->size_shift,sizeof(void *));
-
+
} else {
+
alloced_bytes[key] += p->refs*sizeof(struct pike_string);
} }
-
+
}
string_builder_sprintf(&s, "\nShared string hash table:\n" "-------------------------\n"