>>> The function alloc_sizeof( rstring<RepType> const &s ) does not count the >> book-keeping overhead for the various kinds of strings. For example, the >> default rep (which is used for zstrings) adds 12 bytes oberhead (on 32-bit >> machines). >> >> I changed it to: >> >> return s.capacity() + (s.is_shared() ? 0 : sizeof( RepType )); >> > > This is fine with me, but there are many other things that are shared and yet > their sharing is not taken into account (e.g. qname items in the qname pool, > or atomic items shared among the nodes of copied xml trees). I think we > should have a consistent solution about what to do with "shared" things. > There are several options, but I will let Matthias decide about this. I would vote for something inconsistent but something that seems to make sense for our use case: - don't account for QNames at all - always account for atomic items that are shared among trees -- https://code.launchpad.net/~zorba-coders/zorba/feature-mem_size/+merge/114764 Your team Zorba Coders is subscribed to branch lp:zorba.
-- Mailing list: https://launchpad.net/~zorba-coders Post to : email@example.com Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp