add TString struct size

This commit is contained in:
Cloud Wu
2015-08-21 15:59:51 +08:00
parent 9acce94464
commit bb6d5d826e

View File

@@ -416,7 +416,7 @@ getslot(struct shrmap_slot *s, struct slotinfo *info) {
TString *ts = s->str; TString *ts = s->str;
while (ts) { while (ts) {
++info->len; ++info->len;
info->size += ts->shrlen; info->size += sizelstring(ts->shrlen);
ts = ts->u.hnext; ts = ts->u.hnext;
} }
rwlock_runlock(&s->lock); rwlock_runlock(&s->lock);