Skip to content
Snippets Groups Projects
Commit 697883e5 authored by Per Hedbor's avatar Per Hedbor
Browse files

Fixed multiset and mapping size calculations in rec_size_svalue.

Also handle values that show up multiple times in an object correctly
(before an object with two intances of the same value only got the
first one counted, then divided by the refs. Now both are included in
the total size).

As an example:

| class foo { string a; string b; }
| string q = random_string(10000);
|
| > (f->a = q), _size_object(f);
| (1) Result: 5072
| > (f->b = q), _size_object(f);
| (2) Result: 6744
| > (q=0), _size_object(f);
| (3) Result: 10088

rec_size_svalue is now public, and used from as an example the
ADT.List class.
parent 2687f96a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment