Created
February 17, 2016 09:54
-
-
Save sehe/8d3e5dba7b124a750b9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
Command: ./test Command: ./test | |
Massif arguments: (none) Massif arguments: (none) | |
ms_print arguments: massif.out.12835 | ms_print arguments: massif.out.8577 | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
GB GB | |
1.604^ # | 2.660^ # | |
| :@:# | | :::@::::# | |
| :::::@:#: | | :@@:::@:::::@::::# | |
| ::::: : :@:#: | | @:::::::@ :::@:::::@::::# | |
| ::::::: : :@:#:: | | ::@:::::::@:::: ::@ :::@:::::@::::# | |
| :::::::::: : :@:#::: | | @:::::::: @::: :: @:::: ::@ :::@:::::@::::# | |
| @::::::::::::: : :@:#::: | | ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::# | |
| ::@: ::::::::::: : :@:#:::: | | ::::@:::::::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::# | |
| :::@::@: ::::::::::: : :@:#:::: | | @@@@@:::::: @:::: ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::#: | |
| ::::::@::@: ::::::::::: : :@:#::::: | | @ @ @:::::: @:::: ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::#: | |
| ::::: :::@::@: ::::::::::: : :@:#::::: | | @ @ @:::::: @:::: ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::#: | |
| ::: ::: :::@::@: ::::::::::: : :@:#:::::: | | @ @ @:::::: @:::: ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::#: | |
| :::::: ::: :::@::@: ::::::::::: : :@:#::::::@ | | :@ @ @:::::: @:::: ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::#: | |
| @:@: :::: ::: :::@::@: ::::::::::: : :@:#::::::@ | | :@ @ @:::::: @:::: ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::#: | |
| :::@:@: :::: ::: :::@::@: ::::::::::: : :@:#::::::@: | | :@ @ @:::::: @:::: ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::#: | |
| @:::: @:@: :::: ::: :::@::@: ::::::::::: : :@:#::::::@: | | :@ @ @:::::: @:::: ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::#: | |
| @:@: :: @:@: :::: ::: :::@::@: ::::::::::: : :@:#::::::@:: | | ::@ @ @:::::: @:::: ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::#: | |
| :::@:@: :: @:@: :::: ::: :::@::@: ::::::::::: : :@:#::::::@:: | | ::@ @ @:::::: @:::: ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::#: | |
| @:::::@:@: :: @:@: :::: ::: :::@::@: ::::::::::: : :@:#::::::@::: | | ::@ @ @:::::: @:::: ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::#: | |
| :::@: :::@:@: :: @:@: :::: ::: :::@::@: ::::::::::: : :@:#::::::@:::: | | ::@ @ @:::::: @:::: ::::@::@::: :::: @::: :: @:::: ::@ :::@:::::@::::#: | |
0 +----------------------------------------------------------------------->Gi 0 +----------------------------------------------------------------------->Gi | |
0 5.697 | 0 92.53 | |
Number of snapshots: 71 | Number of snapshots: 77 | |
Detailed snapshots: [5, 10, 12, 16, 18, 30, 33, 48, 50, 53 (peak), 63] | Detailed snapshots: [3, 5, 7, 14, 23, 26, 34, 40, 48, 55, 65, 74 (peak)] | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
0 0 0 0 0 0 0 0 0 0 0 0 | |
1 103,646,769 39,627,624 35,799,576 3,828,048 0 | 1 1,627,138,850 586,864,640 531,260,256 55,604,384 0 | |
2 181,769,524 69,946,640 63,183,920 6,762,720 0 | 2 3,539,592,343 1,248,250,688 1,129,941,584 118,309,104 0 | |
3 313,605,544 119,594,000 108,024,192 11,569,808 0 | 3 5,119,112,391 1,722,827,432 1,560,964,146 161,863,286 0 | |
4 393,137,544 146,083,048 132,001,064 14,081,984 0 | 90.60% (1,560,964,146B) (heap allocation functions) malloc/new/new[], --alloc-fns, | |
5 518,089,740 188,780,808 170,938,696 17,842,112 0 | ->46.13% (794,685,528B) 0x4073B5: Tree::Node<(unsigned char)10>::set_child(unsigne | |
90.55% (170,938,696B) (heap allocation functions) malloc/new/new[], --alloc-fns, e | | ->45.48% (783,525,288B) 0x40496A: main (test.cpp:239) | |
->45.87% (86,597,616B) 0x406385: Tree::Node<(unsigned char)10>::set_child(unsigned < | |
| ->42.88% (80,948,616B) 0x403B0A: main (test.cpp:239) < | |
| | | | | |
| ->02.99% (5,649,000B) 0x403B54: main (test.cpp:257) | | ->00.65% (11,160,240B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | | |
->23.01% (43,429,136B) 0x40725D: Tree::Node<(unsigned char)9>::set_child(unsigned | ->26.07% (449,177,328B) 0x40828D: Tree::Node<(unsigned char)9>::set_child(unsigned | |
| ->20.04% (37,825,808B) 0x403B0A: main (test.cpp:239) | | ->23.47% (404,350,704B) 0x40496A: main (test.cpp:239) | |
| | < | |
| ->02.97% (5,603,328B) 0x403B54: main (test.cpp:257) < | |
| < | |
->10.41% (19,651,320B) 0x40739D: Tree::Node<(unsigned char)8>::set_child(unsigned < | |
| ->09.20% (17,365,568B) 0x403B0A: main (test.cpp:239) < | |
| | | | | |
| ->01.21% (2,285,752B) 0x403B54: main (test.cpp:257) | | ->02.60% (44,826,624B) 0x4049B5: main (test.cpp:257) | |
| | | |
->04.51% (8,519,160B) 0x4074C5: Tree::Node<(unsigned char)7>::set_child(unsigned c | ->10.05% (173,210,824B) 0x4083CD: Tree::Node<(unsigned char)8>::set_child(unsigned | |
| ->04.02% (7,586,040B) 0x403B0A: main (test.cpp:239) | | ->09.13% (157,210,560B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.49% (933,120B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.93% (16,000,264B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->02.99% (5,649,168B) 0x40A30B: Tree::Node<(unsigned char)9>::upgrade() (test.cpp: | ->03.79% (65,232,840B) 0x4084F5: Tree::Node<(unsigned char)7>::set_child(unsigned | |
| ->02.99% (5,649,000B) 0x403B1F: main (test.cpp:252) | | ->03.46% (59,634,120B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.00% (168B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.32% (5,598,720B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->01.71% (3,227,224B) 0x4075D5: Tree::Node<(unsigned char)6>::set_child(unsigned c | ->02.31% (39,845,888B) 0x40B4AB: Tree::Node<(unsigned char)8>::upgrade() (test.cpp | |
| ->01.54% (2,902,224B) 0x403B0A: main (test.cpp:239) | | ->02.31% (39,845,888B) 0x404980: main (test.cpp:252) | |
| | | | | |
| ->00.17% (325,000B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->01.32% (2,490,368B) 0x40A37B: Tree::Node<(unsigned char)8>::upgrade() (test.cpp: | ->01.22% (20,988,344B) 0x408605: Tree::Node<(unsigned char)6>::set_child(unsigned | |
| ->01.32% (2,490,368B) 0x403B1F: main (test.cpp:252) | | ->01.12% (19,363,344B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.09% (1,625,000B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->00.73% (1,374,704B) in 1+ places, all below ms_print's threshold (01.00%) | ->01.03% (17,823,394B) in 29 places, all below massif's threshold (01.00%) | |
| | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
6 669,625,694 244,948,744 221,864,376 23,084,368 0 | 4 6,970,683,823 1,747,585,576 1,579,645,736 167,939,840 0 | |
7 774,252,746 282,352,424 255,623,240 26,729,184 0 | 5 8,257,114,900 1,764,147,016 1,592,658,296 171,488,720 0 | |
8 868,046,781 315,348,712 285,437,688 29,911,024 0 | 90.28% (1,592,658,296B) (heap allocation functions) malloc/new/new[], --alloc-fns, | |
9 940,997,771 340,786,624 308,465,440 32,321,184 0 | ->45.05% (794,685,528B) 0x4073B5: Tree::Node<(unsigned char)10>::set_child(unsigne | |
10 1,042,725,774 377,717,024 342,102,320 35,614,704 0 | | ->44.41% (783,525,288B) 0x40496A: main (test.cpp:239) | |
90.57% (342,102,320B) (heap allocation functions) malloc/new/new[], --alloc-fns, e < | |
->48.61% (183,608,880B) 0x406385: Tree::Node<(unsigned char)10>::set_child(unsigne < | |
| ->45.66% (172,448,640B) 0x403B0A: main (test.cpp:239) < | |
| | | | | |
| ->02.95% (11,160,240B) 0x403B54: main (test.cpp:257) | | ->00.63% (11,160,240B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | | |
->21.67% (81,866,288B) 0x40725D: Tree::Node<(unsigned char)9>::set_child(unsigned | ->25.46% (449,177,328B) 0x40828D: Tree::Node<(unsigned char)9>::set_child(unsigned | |
| ->20.36% (76,885,552B) 0x403B0A: main (test.cpp:239) | | ->22.92% (404,350,704B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->01.32% (4,980,736B) 0x403B54: main (test.cpp:257) | | ->02.54% (44,826,624B) 0x4049B5: main (test.cpp:257) | |
| | | |
->10.41% (39,302,640B) 0x40739D: Tree::Node<(unsigned char)8>::set_child(unsigned | ->09.82% (173,210,824B) 0x4083CD: Tree::Node<(unsigned char)8>::set_child(unsigned | |
| ->09.80% (37,016,888B) 0x403B0A: main (test.cpp:239) | | ->08.91% (157,210,560B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.61% (2,285,752B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.91% (16,000,264B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->04.51% (17,038,320B) 0x4074C5: Tree::Node<(unsigned char)7>::set_child(unsigned | ->03.70% (65,232,840B) 0x4084F5: Tree::Node<(unsigned char)7>::set_child(unsigned | |
| ->04.26% (16,105,200B) 0x403B0A: main (test.cpp:239) | | ->03.38% (59,634,120B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.25% (933,120B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.32% (5,598,720B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->02.95% (11,160,240B) 0x40A30B: Tree::Node<(unsigned char)9>::upgrade() (test.cpp | ->02.81% (49,517,544B) in 35 places, all below massif's threshold (01.00%) | |
| ->02.95% (11,160,072B) 0x403B1F: main (test.cpp:252) < | |
| | < | |
| ->00.00% (168B) in 1+ places, all below ms_print's threshold (01.00%) < | |
| | | |
->01.71% (6,454,448B) 0x4075D5: Tree::Node<(unsigned char)6>::set_child(unsigned c | ->02.26% (39,845,888B) 0x40B4AB: Tree::Node<(unsigned char)8>::upgrade() (test.cpp | |
| ->01.62% (6,129,448B) 0x403B0A: main (test.cpp:239) | | ->02.26% (39,845,888B) 0x404980: main (test.cpp:252) | |
| | | | | |
| ->00.09% (325,000B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->00.71% (2,671,504B) in 1+ places, all below ms_print's threshold (01.00%) | ->01.19% (20,988,344B) 0x408605: Tree::Node<(unsigned char)6>::set_child(unsigned | |
| ->01.10% (19,363,344B) 0x40496A: main (test.cpp:239) | |
> | | |
> ->00.09% (1,625,000B) in 1+ places, all below ms_print's threshold (01.00%) | |
> | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
11 1,157,362,857 419,230,112 379,553,344 39,676,768 0 | 6 9,846,248,688 1,784,266,584 1,608,466,528 175,800,056 0 | |
12 1,251,156,076 452,403,792 409,504,912 42,898,880 0 | 7 10,895,670,231 1,797,507,112 1,618,869,800 178,637,312 0 | |
90.52% (409,504,912B) (heap allocation functions) malloc/new/new[], --alloc-fns, e | 90.06% (1,618,869,800B) (heap allocation functions) malloc/new/new[], --alloc-fns, | |
->47.36% (214,251,576B) 0x406385: Tree::Node<(unsigned char)10>::set_child(unsigne | ->44.21% (794,685,528B) 0x4073B5: Tree::Node<(unsigned char)10>::set_child(unsigne | |
| ->44.89% (203,091,336B) 0x403B0A: main (test.cpp:239) | | ->43.59% (783,525,288B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->02.47% (11,160,240B) 0x403B54: main (test.cpp:257) | | ->00.62% (11,160,240B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | | |
->22.08% (99,889,384B) 0x40725D: Tree::Node<(unsigned char)9>::set_child(unsigned | ->24.99% (449,177,328B) 0x40828D: Tree::Node<(unsigned char)9>::set_child(unsigned | |
| ->20.98% (94,908,648B) 0x403B0A: main (test.cpp:239) | | ->22.50% (404,350,704B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->01.10% (4,980,736B) 0x403B54: main (test.cpp:257) | | ->02.49% (44,826,624B) 0x4049B5: main (test.cpp:257) | |
| | | |
->10.89% (49,257,704B) 0x40739D: Tree::Node<(unsigned char)8>::set_child(unsigned | ->09.64% (173,210,824B) 0x4083CD: Tree::Node<(unsigned char)8>::set_child(unsigned | |
| ->10.38% (46,971,952B) 0x403B0A: main (test.cpp:239) | | ->08.75% (157,210,560B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.51% (2,285,752B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.89% (16,000,264B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->04.89% (22,116,120B) 0x4074C5: Tree::Node<(unsigned char)7>::set_child(unsigned | ->03.63% (65,232,840B) 0x4084F5: Tree::Node<(unsigned char)7>::set_child(unsigned | |
| ->04.68% (21,183,000B) 0x403B0A: main (test.cpp:239) | | ->03.32% (59,634,120B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.21% (933,120B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.31% (5,598,720B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->02.47% (11,160,240B) 0x40A30B: Tree::Node<(unsigned char)9>::upgrade() (test.cpp | ->02.22% (39,845,888B) 0x40B4AB: Tree::Node<(unsigned char)8>::upgrade() (test.cpp | |
| ->02.47% (11,160,072B) 0x403B1F: main (test.cpp:252) | | ->02.22% (39,845,888B) 0x404980: main (test.cpp:252) | |
| | | | | |
| ->00.00% (168B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->01.96% (8,861,632B) 0x4075D5: Tree::Node<(unsigned char)6>::set_child(unsigned c | ->01.76% (31,584,624B) 0x4E6A3D2: std::_Rb_tree<boost::archive::detail::basic_oarc | |
| ->01.89% (8,536,632B) 0x403B0A: main (test.cpp:239) | | ->01.76% (31,584,624B) 0x4E69B90: boost::archive::detail::basic_oarchive::save_p | |
> | ->01.76% (31,584,624B) 0x414A19: void boost::archive::detail::save_pointer_typ | |
> | ->01.76% (31,584,576B) 0x414CBC: boost::archive::detail::oserializer<boost:: | |
> | | ->01.76% (31,584,576B) 0x4E697BB: boost::archive::detail::basic_oarchive:: | |
> | | ->01.76% (31,584,576B) 0x405F4B: void boost::serialization::array<std::p | |
> | | ->01.04% (18,611,376B) 0x415A5F: boost::archive::detail::oserializer<b | |
> | | | ->01.04% (18,611,376B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | | | ->01.04% (18,611,376B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | | | ->01.04% (18,611,376B) 0x414A19: void boost::archive::detail::sa | |
> | | | ->01.04% (18,611,376B) 0x414CBC: boost::archive::detail::oseri | |
> | | | ->01.04% (18,611,376B) 0x4E697BB: boost::archive::detail::ba | |
> | | | ->01.04% (18,611,376B) 0x405F4B: void boost::serialization | |
> | | | ->01.04% (18,611,376B) 0x41598F: boost::archive::detail: | |
> | | | ->01.04% (18,611,376B) 0x4E697BB: boost::archive::deta | |
> | | | ->01.04% (18,611,376B) 0x4E69BF3: boost::archive::de | |
> | | | ->01.04% (18,611,376B) 0x414A19: void boost::archi | |
> | | | ->01.04% (18,611,376B) 0x414CBC: boost::archive: | |
> | | | ->01.04% (18,611,376B) 0x4E697BB: boost::archi | |
> | | | ->01.04% (18,611,376B) 0x405F4B: void boost: | |
> | | | ->01.04% (18,611,376B) 0x41598F: boost::ar | |
> | | | ->01.04% (18,611,376B) 0x4E697BB: boost: | |
> | | | ->01.04% (18,611,376B) 0x4E69BF3: boos | |
> | | | ->01.04% (18,611,376B) 0x414A19: voi | |
> | | | ->01.04% (18,611,376B) 0x414CBC: b | |
> | | | ->01.04% (18,611,376B) 0x4E697BB | |
> | | | ->01.04% (18,611,376B) 0x405F4 | |
> | | | ->01.04% (18,611,376B) 0x415 | |
> | | | ->01.04% (18,611,376B) 0x4 | |
> | | | ->01.04% (18,611,376B) 0 | |
> | | | | |
> | | ->00.72% (12,973,200B) in 1+ places, all below ms_print's threshold (0 | |
> | | | |
> | ->00.00% (48B) in 1+ places, all below ms_print's threshold (01.00%) | |
> | | |
> ->01.46% (26,320,240B) 0x4E6A50B: std::_Rb_tree<boost::archive::object_id_type, bo | |
> | ->01.46% (26,320,240B) 0x4E69C01: boost::archive::detail::basic_oarchive::save_p | |
> | ->01.46% (26,320,240B) 0x414A19: void boost::archive::detail::save_pointer_typ | |
> | ->01.46% (26,320,240B) 0x414CBC: boost::archive::detail::oserializer<boost:: | |
> | ->01.46% (26,320,240B) 0x4E697BB: boost::archive::detail::basic_oarchive:: | |
> | ->01.46% (26,320,240B) 0x405F4B: void boost::serialization::array<std::p | |
> | ->01.46% (26,320,240B) in 2 places, all below massif's threshold (01.0 | |
> | | |
> ->01.17% (20,988,344B) 0x408605: Tree::Node<(unsigned char)6>::set_child(unsigned | |
> | ->01.08% (19,363,344B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.07% (325,000B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.09% (1,625,000B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->00.88% (3,968,256B) in 1+ places, all below ms_print's threshold (01.00%) | ->00.99% (17,824,184B) in 1+ places, all below ms_print's threshold (01.00%) | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
13 1,358,924,420 489,830,544 443,323,632 46,506,912 0 | 8 12,403,403,859 1,816,146,824 1,633,515,288 182,631,536 0 | |
14 1,507,608,563 542,642,656 491,325,216 51,317,440 0 | 9 13,499,923,896 1,829,225,736 1,643,791,576 185,434,160 0 | |
15 1,611,896,323 580,288,440 525,341,240 54,947,200 0 | 10 14,733,535,976 1,844,293,824 1,655,630,792 188,663,032 0 | |
16 1,727,539,755 620,882,056 561,970,328 58,911,728 0 | 11 15,967,129,526 1,859,811,256 1,667,823,056 191,988,200 0 | |
90.51% (561,970,328B) (heap allocation functions) malloc/new/new[], --alloc-fns, e | 12 17,163,762,792 1,875,119,416 1,679,850,896 195,268,520 0 | |
->47.19% (293,009,136B) 0x406385: Tree::Node<(unsigned char)10>::set_child(unsigne | 13 18,586,797,294 1,893,102,808 1,693,980,704 199,122,104 0 | |
| ->45.39% (281,848,896B) 0x403B0A: main (test.cpp:239) | 14 20,721,363,422 1,919,894,776 1,715,031,536 204,863,240 0 | |
| | | 89.33% (1,715,031,536B) (heap allocation functions) malloc/new/new[], --alloc-fns, | |
| ->01.80% (11,160,240B) 0x403B54: main (test.cpp:257) | ->41.39% (794,685,528B) 0x4073B5: Tree::Node<(unsigned char)10>::set_child(unsigne | |
| | | ->40.81% (783,525,288B) 0x40496A: main (test.cpp:239) | |
->22.69% (140,851,712B) 0x40725D: Tree::Node<(unsigned char)9>::set_child(unsigned < | |
| ->21.88% (135,870,976B) 0x403B0A: main (test.cpp:239) < | |
| | | | | |
| ->00.80% (4,980,736B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.58% (11,160,240B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->11.10% (68,929,288B) 0x40739D: Tree::Node<(unsigned char)8>::set_child(unsigned | ->23.40% (449,177,328B) 0x40828D: Tree::Node<(unsigned char)9>::set_child(unsigned | |
| ->10.73% (66,643,536B) 0x403B0A: main (test.cpp:239) | | ->21.06% (404,350,704B) 0x40496A: main (test.cpp:239) | |
> | | | |
> | ->02.33% (44,826,624B) 0x4049B5: main (test.cpp:257) | |
> | | |
> ->09.02% (173,210,824B) 0x4083CD: Tree::Node<(unsigned char)8>::set_child(unsigned | |
> | ->08.19% (157,210,560B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.37% (2,285,752B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.83% (16,000,264B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->04.94% (30,652,680B) 0x4074C5: Tree::Node<(unsigned char)7>::set_child(unsigned | ->04.38% (84,036,480B) 0x4E6A3D2: std::_Rb_tree<boost::archive::detail::basic_oarc | |
| ->04.79% (29,719,560B) 0x403B0A: main (test.cpp:239) | | ->04.38% (84,036,480B) 0x4E69B90: boost::archive::detail::basic_oarchive::save_p | |
> | ->04.38% (84,036,480B) 0x414A19: void boost::archive::detail::save_pointer_typ | |
> | ->04.38% (84,036,432B) 0x414CBC: boost::archive::detail::oserializer<boost:: | |
> | | ->04.38% (84,036,432B) 0x4E697BB: boost::archive::detail::basic_oarchive:: | |
> | | ->04.38% (84,036,432B) 0x405F4B: void boost::serialization::array<std::p | |
> | | ->02.41% (46,349,568B) 0x415A5F: boost::archive::detail::oserializer<b | |
> | | | ->02.41% (46,349,568B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | | | ->02.41% (46,349,568B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | | | ->02.41% (46,349,568B) 0x414A19: void boost::archive::detail::sa | |
> | | | ->02.41% (46,349,568B) 0x414CBC: boost::archive::detail::oseri | |
> | | | ->02.41% (46,349,568B) 0x4E697BB: boost::archive::detail::ba | |
> | | | ->02.41% (46,349,568B) 0x405F4B: void boost::serialization | |
> | | | ->02.41% (46,349,568B) 0x41598F: boost::archive::detail: | |
> | | | ->02.41% (46,349,568B) 0x4E697BB: boost::archive::deta | |
> | | | ->02.41% (46,349,568B) 0x4E69BF3: boost::archive::de | |
> | | | ->02.41% (46,349,568B) 0x414A19: void boost::archi | |
> | | | ->02.41% (46,349,568B) 0x414CBC: boost::archive: | |
> | | | ->02.41% (46,349,568B) 0x4E697BB: boost::archi | |
> | | | ->02.41% (46,349,568B) 0x405F4B: void boost: | |
> | | | ->02.41% (46,349,568B) 0x41598F: boost::ar | |
> | | | ->02.41% (46,349,568B) 0x4E697BB: boost: | |
> | | | ->02.41% (46,349,568B) 0x4E69BF3: boos | |
> | | | ->02.41% (46,349,568B) 0x414A19: voi | |
> | | | ->02.41% (46,349,568B) 0x414CBC: b | |
> | | | ->02.41% (46,349,568B) 0x4E697BB | |
> | | | ->02.41% (46,349,568B) 0x405F4 | |
> | | | ->02.41% (46,349,568B) 0x415 | |
> | | | ->02.41% (46,349,568B) 0x4 | |
> | | | ->02.41% (46,349,568B) 0 | |
> | | | | |
> | | ->01.96% (37,686,864B) 0x41598F: boost::archive::detail::oserializer<b | |
> | | ->01.96% (37,686,864B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | | ->01.96% (37,686,864B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | | ->01.96% (37,686,864B) 0x414A19: void boost::archive::detail::sa | |
> | | ->01.96% (37,686,768B) 0x414CBC: boost::archive::detail::oseri | |
> | | | ->01.96% (37,686,768B) 0x4E697BB: boost::archive::detail::ba | |
> | | | ->01.96% (37,686,768B) 0x405F4B: void boost::serialization | |
> | | | ->01.96% (37,686,768B) 0x41598F: boost::archive::detail: | |
> | | | ->01.96% (37,686,768B) 0x4E697BB: boost::archive::deta | |
> | | | ->01.96% (37,686,768B) 0x4E69BF3: boost::archive::de | |
> | | | ->01.96% (37,686,768B) 0x414A19: void boost::archi | |
> | | | ->01.96% (37,685,904B) 0x414CBC: boost::archive: | |
> | | | | ->01.96% (37,685,904B) 0x4E697BB: boost::archi | |
> | | | | ->01.96% (37,685,904B) 0x405F4B: void boost: | |
> | | | | ->01.96% (37,685,904B) 0x41598F: boost::ar | |
> | | | | ->01.96% (37,685,904B) 0x4E697BB: boost: | |
> | | | | ->01.96% (37,685,904B) 0x4E69BF3: boos | |
> | | | | ->01.96% (37,685,904B) 0x414A19: voi | |
> | | | | ->01.96% (37,677,552B) 0x414CBC: b | |
> | | | | | ->01.96% (37,677,552B) 0x4E697BB | |
> | | | | | ->01.96% (37,677,552B) 0x405F4 | |
> | | | | | ->01.96% (37,677,552B) 0x415 | |
> | | | | | ->01.96% (37,677,552B) 0x4 | |
> | | | | | ->01.96% (37,677,552B) 0 | |
> | | | | | | |
> | | | | ->00.00% (8,352B) in 1+ places, al | |
> | | | | | |
> | | | ->00.00% (864B) in 1+ places, all below ms_print | |
> | | | | |
> | | ->00.00% (96B) in 1+ places, all below ms_print's threshold (0 | |
> | | | |
> | ->00.00% (48B) in 1+ places, all below ms_print's threshold (01.00%) | |
> | | |
> ->03.65% (70,030,120B) 0x4E6A50B: std::_Rb_tree<boost::archive::object_id_type, bo | |
> | ->03.65% (70,030,120B) 0x4E69C01: boost::archive::detail::basic_oarchive::save_p | |
> | ->03.65% (70,030,120B) 0x414A19: void boost::archive::detail::save_pointer_typ | |
> | ->03.65% (70,030,120B) 0x414CBC: boost::archive::detail::oserializer<boost:: | |
> | ->03.65% (70,030,120B) 0x4E697BB: boost::archive::detail::basic_oarchive:: | |
> | ->03.65% (70,030,120B) 0x405F4B: void boost::serialization::array<std::p | |
> | ->02.01% (38,624,640B) 0x415A5F: boost::archive::detail::oserializer<b | |
> | | ->02.01% (38,624,640B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | | ->02.01% (38,624,640B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | | ->02.01% (38,624,640B) 0x414A19: void boost::archive::detail::sa | |
> | | ->02.01% (38,624,640B) 0x414CBC: boost::archive::detail::oseri | |
> | | ->02.01% (38,624,640B) 0x4E697BB: boost::archive::detail::ba | |
> | | ->02.01% (38,624,640B) 0x405F4B: void boost::serialization | |
> | | ->02.01% (38,624,640B) 0x41598F: boost::archive::detail: | |
> | | ->02.01% (38,624,640B) 0x4E697BB: boost::archive::deta | |
> | | ->02.01% (38,624,640B) 0x4E69BF3: boost::archive::de | |
> | | ->02.01% (38,624,640B) 0x414A19: void boost::archi | |
> | | ->02.01% (38,624,640B) 0x414CBC: boost::archive: | |
> | | ->02.01% (38,624,640B) 0x4E697BB: boost::archi | |
> | | ->02.01% (38,624,640B) 0x405F4B: void boost: | |
> | | ->02.01% (38,624,640B) 0x41598F: boost::ar | |
> | | ->02.01% (38,624,640B) 0x4E697BB: boost: | |
> | | ->02.01% (38,624,640B) 0x4E69BF3: boos | |
> | | ->02.01% (38,624,640B) 0x414A19: voi | |
> | | ->02.01% (38,624,640B) 0x414CBC: b | |
> | | ->02.01% (38,624,640B) 0x4E697BB | |
> | | ->02.01% (38,624,640B) 0x405F4 | |
> | | ->02.01% (38,624,640B) 0x415 | |
> | | ->02.01% (38,624,640B) 0x4 | |
> | | ->02.01% (38,624,640B) 0 | |
> | | | |
> | ->01.64% (31,405,480B) 0x41598F: boost::archive::detail::oserializer<b | |
> | ->01.64% (31,405,480B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | ->01.64% (31,405,480B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | ->01.64% (31,405,480B) 0x414A19: void boost::archive::detail::sa | |
> | ->01.64% (31,405,440B) 0x414CBC: boost::archive::detail::oseri | |
> | | ->01.64% (31,405,440B) 0x4E697BB: boost::archive::detail::ba | |
> | | ->01.64% (31,405,440B) 0x405F4B: void boost::serialization | |
> | | ->01.64% (31,405,440B) 0x41598F: boost::archive::detail: | |
> | | ->01.64% (31,405,440B) 0x4E697BB: boost::archive::deta | |
> | | ->01.64% (31,405,440B) 0x4E69BF3: boost::archive::de | |
> | | ->01.64% (31,405,440B) 0x414A19: void boost::archi | |
> | | ->01.64% (31,404,760B) 0x414CBC: boost::archive: | |
> | | | ->01.64% (31,404,760B) 0x4E697BB: boost::archi | |
> | | | ->01.64% (31,404,760B) 0x405F4B: void boost: | |
> | | | ->01.64% (31,404,760B) 0x41598F: boost::ar | |
> | | | ->01.64% (31,404,760B) 0x4E697BB: boost: | |
> | | | ->01.64% (31,404,760B) 0x4E69BF3: boos | |
> | | | ->01.64% (31,404,760B) 0x414A19: voi | |
> | | | ->01.64% (31,397,840B) 0x414CBC: b | |
> | | | | ->01.64% (31,397,840B) 0x4E697BB | |
> | | | | ->01.64% (31,397,840B) 0x405F4 | |
> | | | | ->01.64% (31,397,840B) 0x415 | |
> | | | | ->01.64% (31,397,840B) 0x4 | |
> | | | | ->01.64% (31,397,840B) 0 | |
> | | | | | |
> | | | ->00.00% (6,920B) in 1+ places, al | |
> | | | | |
> | | ->00.00% (680B) in 1+ places, all below ms_print | |
> | | | |
> | ->00.00% (40B) in 1+ places, all below ms_print's threshold (0 | |
> | | |
> ->03.40% (65,232,840B) 0x4084F5: Tree::Node<(unsigned char)7>::set_child(unsigned | |
> | ->03.11% (59,634,120B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.15% (933,120B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.29% (5,598,720B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->01.95% (12,100,192B) 0x4075D5: Tree::Node<(unsigned char)6>::set_child(unsigned | ->02.08% (39,845,888B) 0x40B4AB: Tree::Node<(unsigned char)8>::upgrade() (test.cpp | |
| ->01.90% (11,775,192B) 0x403B0A: main (test.cpp:239) | | ->02.08% (39,845,888B) 0x404980: main (test.cpp:252) | |
| | | | | |
| ->00.05% (325,000B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->01.80% (11,160,240B) 0x40A30B: Tree::Node<(unsigned char)9>::upgrade() (test.cpp | ->01.09% (20,988,344B) 0x408605: Tree::Node<(unsigned char)6>::set_child(unsigned | |
| ->01.80% (11,160,072B) 0x403B1F: main (test.cpp:252) | | ->01.01% (19,363,344B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.00% (168B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.08% (1,625,000B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->00.85% (5,267,080B) in 1+ places, all below ms_print's threshold (01.00%) | ->00.93% (17,824,184B) in 1+ places, all below ms_print's threshold (01.00%) | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
17 1,793,622,115 643,707,848 582,602,504 61,105,344 0 | 15 22,144,409,817 1,937,317,496 1,728,720,816 208,596,680 0 | |
18 1,892,745,711 677,858,512 613,504,656 64,353,856 0 | 16 24,041,802,647 1,960,280,800 1,746,763,416 213,517,384 0 | |
90.51% (613,504,656B) (heap allocation functions) malloc/new/new[], --alloc-fns, e | 17 25,227,668,134 1,975,266,344 1,758,537,768 216,728,576 0 | |
->46.73% (316,729,392B) 0x406385: Tree::Node<(unsigned char)10>::set_child(unsigne | 18 27,125,045,932 1,999,341,472 1,777,453,944 221,887,528 0 | |
| ->45.08% (305,569,152B) 0x403B0A: main (test.cpp:239) | 19 29,196,463,342 2,025,452,984 1,797,970,128 227,482,856 0 | |
> 20 30,841,283,613 2,045,636,952 1,813,828,960 231,807,992 0 | |
> 21 32,486,095,232 2,065,094,600 1,829,117,112 235,977,488 0 | |
> 22 33,719,699,461 2,080,765,808 1,841,430,208 239,335,600 0 | |
> 23 35,364,504,210 2,101,502,272 1,857,723,144 243,779,128 0 | |
> 88.40% (1,857,723,144B) (heap allocation functions) malloc/new/new[], --alloc-fns, | |
> ->37.82% (794,685,528B) 0x4073B5: Tree::Node<(unsigned char)10>::set_child(unsigne | |
> | ->37.28% (783,525,288B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->01.65% (11,160,240B) 0x403B54: main (test.cpp:257) | | ->00.53% (11,160,240B) in 1+ places, all below ms_print's threshold (01.00%) | |
| < | |
->22.83% (154,757,128B) 0x40725D: Tree::Node<(unsigned char)9>::set_child(unsigned < | |
| ->22.10% (149,776,392B) 0x403B0A: main (test.cpp:239) < | |
| | < | |
| ->00.73% (4,980,736B) in 1+ places, all below ms_print's threshold (01.00%) < | |
| | | |
->11.60% (78,605,280B) 0x40739D: Tree::Node<(unsigned char)8>::set_child(unsigned | ->21.37% (449,177,328B) 0x40828D: Tree::Node<(unsigned char)9>::set_child(unsigned | |
| ->11.26% (76,319,528B) 0x403B0A: main (test.cpp:239) | | ->19.24% (404,350,704B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.34% (2,285,752B) in 1+ places, all below ms_print's threshold (01.00%) | | ->02.13% (44,826,624B) 0x4049B5: main (test.cpp:257) | |
| | | | |
->05.03% (34,076,640B) 0x4074C5: Tree::Node<(unsigned char)7>::set_child(unsigned | ->08.24% (173,210,824B) 0x4083CD: Tree::Node<(unsigned char)8>::set_child(unsigned | |
| ->04.89% (33,143,520B) 0x403B0A: main (test.cpp:239) | | ->07.48% (157,210,560B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.14% (933,120B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.76% (16,000,264B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->01.90% (12,908,896B) 0x4075D5: Tree::Node<(unsigned char)6>::set_child(unsigned | ->07.70% (161,868,288B) 0x4E6A3D2: std::_Rb_tree<boost::archive::detail::basic_oar | |
| ->01.86% (12,583,896B) 0x403B0A: main (test.cpp:239) | | ->07.70% (161,868,288B) 0x4E69B90: boost::archive::detail::basic_oarchive::save_ | |
> | ->07.70% (161,868,288B) 0x414A19: void boost::archive::detail::save_pointer_ty | |
> | ->07.70% (161,868,240B) 0x414CBC: boost::archive::detail::oserializer<boost: | |
> | | ->07.70% (161,868,240B) 0x4E697BB: boost::archive::detail::basic_oarchive: | |
> | | ->07.70% (161,868,240B) 0x405F4B: void boost::serialization::array<std:: | |
> | | ->04.10% (86,158,080B) 0x415A5F: boost::archive::detail::oserializer<b | |
> | | | ->04.10% (86,158,080B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | | | ->04.10% (86,158,080B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | | | ->04.10% (86,158,080B) 0x414A19: void boost::archive::detail::sa | |
> | | | ->04.10% (86,158,080B) 0x414CBC: boost::archive::detail::oseri | |
> | | | ->04.10% (86,158,080B) 0x4E697BB: boost::archive::detail::ba | |
> | | | ->04.10% (86,158,080B) 0x405F4B: void boost::serialization | |
> | | | ->04.10% (86,158,080B) 0x41598F: boost::archive::detail: | |
> | | | ->04.10% (86,158,080B) 0x4E697BB: boost::archive::deta | |
> | | | ->04.10% (86,158,080B) 0x4E69BF3: boost::archive::de | |
> | | | ->04.10% (86,158,080B) 0x414A19: void boost::archi | |
> | | | ->04.10% (86,158,080B) 0x414CBC: boost::archive: | |
> | | | ->04.10% (86,158,080B) 0x4E697BB: boost::archi | |
> | | | ->04.10% (86,158,080B) 0x405F4B: void boost: | |
> | | | ->04.10% (86,158,080B) 0x41598F: boost::ar | |
> | | | ->04.10% (86,158,080B) 0x4E697BB: boost: | |
> | | | ->04.10% (86,158,080B) 0x4E69BF3: boos | |
> | | | ->04.10% (86,158,080B) 0x414A19: voi | |
> | | | ->04.10% (86,158,080B) 0x414CBC: b | |
> | | | ->04.10% (86,158,080B) 0x4E697BB | |
> | | | ->04.10% (86,158,080B) 0x405F4 | |
> | | | ->04.10% (86,158,080B) 0x415 | |
> | | | ->04.10% (86,158,080B) 0x4 | |
> | | | ->04.10% (86,158,080B) 0 | |
> | | | | |
> | | ->03.60% (75,710,160B) 0x41598F: boost::archive::detail::oserializer<b | |
> | | ->03.60% (75,710,160B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | | ->03.60% (75,710,160B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | | ->03.60% (75,710,160B) 0x414A19: void boost::archive::detail::sa | |
> | | ->03.60% (75,709,968B) 0x414CBC: boost::archive::detail::oseri | |
> | | | ->03.60% (75,709,968B) 0x4E697BB: boost::archive::detail::ba | |
> | | | ->03.60% (75,709,968B) 0x405F4B: void boost::serialization | |
> | | | ->03.60% (75,709,968B) 0x41598F: boost::archive::detail: | |
> | | | ->03.60% (75,709,968B) 0x4E697BB: boost::archive::deta | |
> | | | ->03.60% (75,709,968B) 0x4E69BF3: boost::archive::de | |
> | | | ->03.60% (75,709,968B) 0x414A19: void boost::archi | |
> | | | ->03.60% (75,708,336B) 0x414CBC: boost::archive: | |
> | | | | ->03.60% (75,708,336B) 0x4E697BB: boost::archi | |
> | | | | ->03.60% (75,708,336B) 0x405F4B: void boost: | |
> | | | | ->03.60% (75,708,336B) 0x41598F: boost::ar | |
> | | | | ->03.60% (75,708,336B) 0x4E697BB: boost: | |
> | | | | ->03.60% (75,708,336B) 0x4E69BF3: boos | |
> | | | | ->03.60% (75,708,336B) 0x414A19: voi | |
> | | | | ->03.60% (75,692,304B) 0x414CBC: b | |
> | | | | | ->03.60% (75,692,304B) 0x4E697BB | |
> | | | | | ->03.60% (75,692,304B) 0x405F4 | |
> | | | | | ->03.60% (75,692,304B) 0x415 | |
> | | | | | ->03.60% (75,692,304B) 0x4 | |
> | | | | | ->03.60% (75,692,304B) 0 | |
> | | | | | | |
> | | | | ->00.00% (16,032B) in 1+ places, a | |
> | | | | | |
> | | | ->00.00% (1,632B) in 1+ places, all below ms_pri | |
> | | | | |
> | | ->00.00% (192B) in 1+ places, all below ms_print's threshold ( | |
> | | | |
> | ->00.00% (48B) in 1+ places, all below ms_print's threshold (01.00%) | |
> | | |
> ->06.42% (134,889,920B) 0x4E6A50B: std::_Rb_tree<boost::archive::object_id_type, b | |
> | ->06.42% (134,889,920B) 0x4E69C01: boost::archive::detail::basic_oarchive::save_ | |
> | ->06.42% (134,889,920B) 0x414A19: void boost::archive::detail::save_pointer_ty | |
> | ->06.42% (134,889,920B) 0x414CBC: boost::archive::detail::oserializer<boost: | |
> | ->06.42% (134,889,920B) 0x4E697BB: boost::archive::detail::basic_oarchive: | |
> | ->06.42% (134,889,920B) 0x405F4B: void boost::serialization::array<std:: | |
> | ->03.42% (71,798,400B) 0x415A5F: boost::archive::detail::oserializer<b | |
> | | ->03.42% (71,798,400B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | | ->03.42% (71,798,400B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | | ->03.42% (71,798,400B) 0x414A19: void boost::archive::detail::sa | |
> | | ->03.42% (71,798,400B) 0x414CBC: boost::archive::detail::oseri | |
> | | ->03.42% (71,798,400B) 0x4E697BB: boost::archive::detail::ba | |
> | | ->03.42% (71,798,400B) 0x405F4B: void boost::serialization | |
> | | ->03.42% (71,798,400B) 0x41598F: boost::archive::detail: | |
> | | ->03.42% (71,798,400B) 0x4E697BB: boost::archive::deta | |
> | | ->03.42% (71,798,400B) 0x4E69BF3: boost::archive::de | |
> | | ->03.42% (71,798,400B) 0x414A19: void boost::archi | |
> | | ->03.42% (71,798,400B) 0x414CBC: boost::archive: | |
> | | ->03.42% (71,798,400B) 0x4E697BB: boost::archi | |
> | | ->03.42% (71,798,400B) 0x405F4B: void boost: | |
> | | ->03.42% (71,798,400B) 0x41598F: boost::ar | |
> | | ->03.42% (71,798,400B) 0x4E697BB: boost: | |
> | | ->03.42% (71,798,400B) 0x4E69BF3: boos | |
> | | ->03.42% (71,798,400B) 0x414A19: voi | |
> | | ->03.42% (71,798,400B) 0x414CBC: b | |
> | | ->03.42% (71,798,400B) 0x4E697BB | |
> | | ->03.42% (71,798,400B) 0x405F4 | |
> | | ->03.42% (71,798,400B) 0x415 | |
> | | ->03.42% (71,798,400B) 0x4 | |
> | | ->03.42% (71,798,400B) 0 | |
> | | | |
> | ->03.00% (63,091,520B) 0x41598F: boost::archive::detail::oserializer<b | |
> | ->03.00% (63,091,520B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | ->03.00% (63,091,520B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | ->03.00% (63,091,520B) 0x414A19: void boost::archive::detail::sa | |
> | ->03.00% (63,091,400B) 0x414CBC: boost::archive::detail::oseri | |
> | | ->03.00% (63,091,400B) 0x4E697BB: boost::archive::detail::ba | |
> | | ->03.00% (63,091,400B) 0x405F4B: void boost::serialization | |
> | | ->03.00% (63,091,400B) 0x41598F: boost::archive::detail: | |
> | | ->03.00% (63,091,400B) 0x4E697BB: boost::archive::deta | |
> | | ->03.00% (63,091,400B) 0x4E69BF3: boost::archive::de | |
> | | ->03.00% (63,091,400B) 0x414A19: void boost::archi | |
> | | ->03.00% (63,090,080B) 0x414CBC: boost::archive: | |
> | | | ->03.00% (63,090,080B) 0x4E697BB: boost::archi | |
> | | | ->03.00% (63,090,080B) 0x405F4B: void boost: | |
> | | | ->03.00% (63,090,080B) 0x41598F: boost::ar | |
> | | | ->03.00% (63,090,080B) 0x4E697BB: boost: | |
> | | | ->03.00% (63,090,080B) 0x4E69BF3: boos | |
> | | | ->03.00% (63,090,080B) 0x414A19: voi | |
> | | | ->03.00% (63,076,760B) 0x414CBC: b | |
> | | | | ->03.00% (63,076,760B) 0x4E697BB | |
> | | | | ->03.00% (63,076,760B) 0x405F4 | |
> | | | | ->03.00% (63,076,760B) 0x415 | |
> | | | | ->03.00% (63,076,760B) 0x4 | |
> | | | | ->03.00% (63,076,760B) 0 | |
> | | | | | |
> | | | ->00.00% (13,320B) in 1+ places, a | |
> | | | | |
> | | ->00.00% (1,320B) in 1+ places, all below ms_pri | |
> | | | |
> | ->00.00% (120B) in 1+ places, all below ms_print's threshold ( | |
> | | |
> ->03.10% (65,232,840B) 0x4084F5: Tree::Node<(unsigned char)7>::set_child(unsigned | |
> | ->02.84% (59,634,120B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.05% (325,000B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.27% (5,598,720B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->01.65% (11,160,240B) 0x40A30B: Tree::Node<(unsigned char)9>::upgrade() (test.cpp | ->01.90% (39,845,888B) 0x40B4AB: Tree::Node<(unsigned char)8>::upgrade() (test.cpp | |
| ->01.65% (11,160,072B) 0x403B1F: main (test.cpp:252) | | ->01.90% (39,845,888B) 0x404980: main (test.cpp:252) | |
| | | | | |
| ->00.00% (168B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->00.78% (5,267,080B) in 1+ places, all below ms_print's threshold (01.00%) | ->01.85% (38,812,528B) in 34 places, all below massif's threshold (01.00%) | |
| | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) | |
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- | |
19 2,028,081,062 726,186,016 657,398,240 68,787,776 0 | 24 36,186,911,506 2,111,857,064 1,865,859,048 245,998,016 0 | |
20 2,142,445,590 766,699,704 693,994,504 72,705,200 0 | 25 38,242,926,430 2,137,705,264 1,886,168,352 251,536,912 0 | |
21 2,225,049,019 795,188,536 719,713,576 75,474,960 0 | 26 39,476,539,836 2,152,947,232 1,898,144,184 254,803,048 0 | |
22 2,307,651,855 823,486,160 745,274,224 78,211,936 0 | 88.16% (1,898,144,184B) (heap allocation functions) malloc/new/new[], --alloc-fns, | |
23 2,417,789,985 861,427,928 779,675,384 81,752,544 0 | ->36.91% (794,685,528B) 0x4073B5: Tree::Node<(unsigned char)10>::set_child(unsigne | |
24 2,551,507,546 908,855,240 822,685,608 86,169,632 0 | | ->36.39% (783,525,288B) 0x40496A: main (test.cpp:239) | |
25 2,673,722,578 951,210,408 860,950,536 90,259,872 0 < | |
26 2,783,860,321 988,689,080 894,799,624 93,889,456 0 < | |
27 2,921,532,672 1,035,826,704 937,554,864 98,271,840 0 < | |
28 2,992,416,989 1,060,637,672 960,093,640 100,544,032 0 < | |
29 3,088,614,658 1,093,608,320 989,883,936 103,724,384 0 < | |
30 3,159,328,269 1,117,619,984 1,011,605,104 106,014,880 0 < | |
90.51% (1,011,605,104B) (heap allocation functions) malloc/new/new[], --alloc-fns, < | |
->47.06% (525,999,600B) 0x406385: Tree::Node<(unsigned char)10>::set_child(unsigne < | |
| ->46.07% (514,839,360B) 0x403B0A: main (test.cpp:239) < | |
| | < | |
| ->01.00% (11,160,240B) in 1+ places, all below ms_print's threshold (01.00%) < | |
| < | |
->23.40% (261,577,712B) 0x40725D: Tree::Node<(unsigned char)9>::set_child(unsigned < | |
| ->22.96% (256,596,976B) 0x403B0A: main (test.cpp:239) < | |
| | | | | |
| ->00.45% (4,980,736B) in 1+ places, all below ms_print's threshold (01.00%) | | ->00.52% (11,160,240B) in 1+ places, all below ms_print's threshold (01.00%) | |
| | | |
->11.33% (126,590,704B) 0x40739D: Tree::Node<(unsigned char)8>::set_child(unsigned | ->20.86% (449,177,328B) 0x40828D: Tree::Node<(unsigned char)9>::set_child(unsigned | |
| ->11.12% (124,304,952B) 0x403B0A: main (test.cpp:239) | | ->18.78% (404,350,704B) 0x40496A: main (test.cpp:239) | |
| | | | | |
| ->00.20% (2,285,752B) in 1+ places, all below ms_print's threshold (01.00%) | | ->02.08% (44,826,624B) 0x4049B5: main (test.cpp:257) | |
| | | | |
->04.96% (55,449,840B) 0x4074C5: Tree::Node<(unsigned char)7>::set_child(unsigned | ->08.54% (183,916,128B) 0x4E6A3D2: std::_Rb_tree<boost::archive::detail::basic_oar | |
| ->04.88% (54,516,720B) 0x403B0A: main (test.cpp:239) | | ->08.54% (183,916,128B) 0x4E69B90: boost::archive::detail::basic_oarchive::save_ | |
> | ->08.54% (183,916,128B) 0x414A19: void boost::archive::detail::save_pointer_ty | |
> | ->08.54% (183,916,080B) 0x414CBC: boost::archive::detail::oserializer<boost: | |
> | | ->08.54% (183,916,080B) 0x4E697BB: boost::archive::detail::basic_oarchive: | |
> | | ->08.54% (183,916,080B) 0x405F4B: void boost::serialization::array<std:: | |
> | | ->04.61% (99,202,320B) 0x415A5F: boost::archive::detail::oserializer<b | |
> | | | ->04.61% (99,202,320B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | | | ->04.61% (99,202,320B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | | | ->04.61% (99,202,320B) 0x414A19: void boost::archive::detail::sa | |
> | | | ->04.61% (99,202,320B) 0x414CBC: boost::archive::detail::oseri | |
> | | | ->04.61% (99,202,320B) 0x4E697BB: boost::archive::detail::ba | |
> | | | ->04.61% (99,202,320B) 0x405F4B: void boost::serialization | |
> | | | ->04.61% (99,202,320B) 0x41598F: boost::archive::detail: | |
> | | | ->04.61% (99,202,320B) 0x4E697BB: boost::archive::deta | |
> | | | ->04.61% (99,202,320B) 0x4E69BF3: boost::archive::de | |
> | | | ->04.61% (99,202,320B) 0x414A19: void boost::archi | |
> | | | ->04.61% (99,202,320B) 0x414CBC: boost::archive: | |
> | | | ->04.61% (99,202,320B) 0x4E697BB: boost::archi | |
> | | | ->04.61% (99,202,320B) 0x405F4B: void boost: | |
> | | | ->04.61% (99,202,320B) 0x41598F: boost::ar | |
> | | | ->04.61% (99,202,320B) 0x4E697BB: boost: | |
> | | | ->04.61% (99,202,320B) 0x4E69BF3: boos | |
> | | | ->04.61% (99,202,320B) 0x414A19: voi | |
> | | | ->04.61% (99,202,320B) 0x414CBC: b | |
> | | | ->04.61% (99,202,320B) 0x4E697BB | |
> | | | ->04.61% (99,202,320B) 0x405F4 | |
> | | | ->04.61% (99,202,320B) 0x415 | |
> | | | ->04.61% (99,202,320B) 0x4 | |
> | | | ->04.61% (99,202,320B) 0 | |
> | | | | |
> | | ->03.93% (84,713,760B) 0x41598F: boost::archive::detail::oserializer<b | |
> | | ->03.93% (84,713,760B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | | ->03.93% (84,713,760B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | | ->03.93% (84,713,760B) 0x414A19: void boost::archive::detail::sa | |
> | | ->03.93% (84,713,568B) 0x414CBC: boost::archive::detail::oseri | |
> | | | ->03.93% (84,713,568B) 0x4E697BB: boost::archive::detail::ba | |
> | | | ->03.93% (84,713,568B) 0x405F4B: void boost::serialization | |
> | | | ->03.93% (84,713,568B) 0x41598F: boost::archive::detail: | |
> | | | ->03.93% (84,713,568B) 0x4E697BB: boost::archive::deta | |
> | | | ->03.93% (84,713,568B) 0x4E69BF3: boost::archive::de | |
> | | | ->03.93% (84,713,568B) 0x414A19: void boost::archi | |
> | | | ->03.93% (84,711,744B) 0x414CBC: boost::archive: | |
> | | | | ->03.93% (84,711,744B) 0x4E697BB: boost::archi | |
> | | | | ->03.93% (84,711,744B) 0x405F4B: void boost: | |
> | | | | ->03.93% (84,711,744B) 0x41598F: boost::ar | |
> | | | | ->03.93% (84,711,744B) 0x4E697BB: boost: | |
> | | | | ->03.93% (84,711,744B) 0x4E69BF3: boos | |
> | | | | ->03.93% (84,711,744B) 0x414A19: voi | |
> | | | | ->03.93% (84,693,552B) 0x414CBC: b | |
> | | | | | ->03.93% (84,693,552B) 0x4E697BB | |
> | | | | | ->03.93% (84,693,552B) 0x405F4 | |
> | | | | | ->03.93% (84,693,552B) 0x415 | |
> | | | | | ->03.93% (84,693,552B) 0x4 | |
> | | | | | ->03.93% (84,693,552B) 0 | |
> | | | | | | |
> | | | | ->00.00% (18,192B) in 1+ places, a | |
> | | | | | |
> | | | ->00.00% (1,824B) in 1+ places, all below ms_pri | |
> | | | | |
> | | ->00.00% (192B) in 1+ places, all below ms_print's threshold ( | |
> | | | |
> | ->00.00% (48B) in 1+ places, all below ms_print's threshold (01.00%) | |
> | | |
> ->08.05% (173,210,824B) 0x4083CD: Tree::Node<(unsigned char)8>::set_child(unsigned | |
> | ->07.30% (157,210,560B) 0x40496A: main (test.cpp:239) | |
> | | | |
> | ->00.74% (16,000,264B) in 1+ places, all below ms_print's threshold (01.00%) | |
> | | |
> ->07.12% (153,263,120B) 0x4E6A50B: std::_Rb_tree<boost::archive::object_id_type, b | |
> | ->07.12% (153,263,120B) 0x4E69C01: boost::archive::detail::basic_oarchive::save_ | |
> | ->07.12% (153,263,120B) 0x414A19: void boost::archive::detail::save_pointer_ty | |
> | ->07.12% (153,263,120B) 0x414CBC: boost::archive::detail::oserializer<boost: | |
> | ->07.12% (153,263,120B) 0x4E697BB: boost::archive::detail::basic_oarchive: | |
> | ->07.12% (153,263,120B) 0x405F4B: void boost::serialization::array<std:: | |
> | ->03.84% (82,668,600B) 0x415A5F: boost::archive::detail::oserializer<b | |
> | | ->03.84% (82,668,600B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | | ->03.84% (82,668,600B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | | ->03.84% (82,668,600B) 0x414A19: void boost::archive::detail::sa | |
> | | ->03.84% (82,668,600B) 0x414CBC: boost::archive::detail::oseri | |
> | | ->03.84% (82,668,600B) 0x4E697BB: boost::archive::detail::ba | |
> | | ->03.84% (82,668,600B) 0x405F4B: void boost::serialization | |
> | | ->03.84% (82,668,600B) 0x41598F: boost::archive::detail: | |
> | | ->03.84% (82,668,600B) 0x4E697BB: boost::archive::deta | |
> | | ->03.84% (82,668,600B) 0x4E69BF3: boost::archive::de | |
> | | ->03.84% (82,668,600B) 0x414A19: void boost::archi | |
> | | ->03.84% (82,668,600B) 0x414CBC: boost::archive: | |
> | | ->03.84% (82,668,600B) 0x4E697BB: boost::archi | |
> | | ->03.84% (82,668,600B) 0x405F4B: void boost: | |
> | | ->03.84% (82,668,600B) 0x41598F: boost::ar | |
> | | ->03.84% (82,668,600B) 0x4E697BB: boost: | |
> | | ->03.84% (82,668,600B) 0x4E69BF3: boos | |
> | | ->03.84% (82,668,600B) 0x414A19: voi | |
> | | ->03.84% (82,668,600B) 0x414CBC: b | |
> | | ->03.84% (82,668,600B) 0x4E697BB | |
> | | ->03.84% (82,668,600B) 0x405F4 | |
> | | ->03.84% (82,668,600B) 0x415 | |
> | | ->03.84% (82,668,600B) 0x4 | |
> | | ->03.84% (82,668,600B) 0 | |
> | | | |
> | ->03.28% (70,594,520B) 0x41598F: boost::archive::detail::oserializer<b | |
> | ->03.28% (70,594,520B) 0x4E697BB: boost::archive::detail::basic_oarc | |
> | ->03.28% (70,594,520B) 0x4E69BF3: boost::archive::detail::basic_oa | |
> | ->03.28% (70,594,520B) 0x414A19: void boost::archive::detail::sa | |
> | ->03.28% (70,594,400B) 0x414CBC: boost::archive::detail::oseri | |
> | | ->03.28% (70,594,400B) 0x4E697BB: boost::archive::detail::ba | |
> | | ->03.28% (70,594,400B) 0x405F4B: void boost::serialization | |
> | | ->03.28% (70,594,400B) 0x41598F: boost::archive::detail: | |
> | | ->03.28% (70,594,400B) 0x4E697BB: boost::archive::deta | |
> | | ->03.28% (70,594,400B) 0x4E69BF3: boost::archive::de | |
> | | ->03.28% (70,594,400B) 0x414A19: void boost::archi | |
> | | ->03.28% (70,592,920B) 0x414CBC: boost::archive: | |
> | | | ->03.28% (70,592,920B) 0x4E697BB: boost::archi | |
> | | | ->03.28% (70,592,920B) 0x405F4B: void boost: | |
> | | | ->03.28% (70,592,920B) 0x41598F: boost::ar | |
> | | | ->03.28% (70,592,920B) 0x4E697BB: boost: | |
> | | | ->03.28% (70,592,920B) 0x4E69BF3: boos | |
> | | | ->03.28% (70,592,920B) 0x414A19: voi | |
> | | | ->03.28% (70,577,800B) 0x414CBC: b | |
> | | | | ->03.28% (70,577,800B) 0x4E697BB | |
> | | | | ->03.28% (70,577,800B) 0x405F4 | |
> | | | | ->03.28% (70,577,800B) 0x415 | |
> | | | | ->03.28% (70,577,800B) 0x4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef TREE_HH | |
#define TREE_HH | |
#include <utility> | |
#include <boost/serialization/export.hpp> | |
#include <boost/serialization/tracking.hpp> | |
#include <boost/serialization/split_member.hpp> | |
#include <boost/serialization/utility.hpp> | |
#include <boost/serialization/base_object.hpp> | |
#include <boost/preprocessor/tuple/enum.hpp> | |
#include <unordered_map> | |
#include <iostream> | |
using namespace std; | |
#define FOO_CLASS_TRACKING(E, PARAMETER_TUPLE, ...) \ | |
namespace boost { \ | |
namespace serialization { \ | |
template<BOOST_PP_TUPLE_ENUM(PARAMETER_TUPLE)> \ | |
struct tracking_level< __VA_ARGS__ > \ | |
{ \ | |
typedef mpl::integral_c_tag tag; \ | |
typedef mpl::int_< E> type; \ | |
BOOST_STATIC_CONSTANT( \ | |
int, \ | |
value = tracking_level::type::value \ | |
); \ | |
/* tracking for a class */ \ | |
BOOST_STATIC_ASSERT(( \ | |
mpl::greater< \ | |
/* that is a prmitive */ \ | |
implementation_level< __VA_ARGS__ >, \ | |
mpl::int_<primitive_type> \ | |
>::value \ | |
)); \ | |
}; \ | |
}} | |
namespace Tree | |
{ | |
class NodeInterface | |
{ | |
public: | |
NodeInterface() | |
{} | |
virtual NodeInterface *get_child(const uint8_t i) const = 0; | |
virtual NodeInterface *set_child(const uint8_t i) = 0; | |
virtual void set_child(const uint8_t i, NodeInterface *child) = 0; | |
virtual NodeInterface *upgrade() = 0; | |
virtual void print(int indention = 0) const = 0; | |
template <typename Archive> | |
void save(Archive &ar, const unsigned int version) const | |
{ | |
} | |
template <typename Archive> | |
void load(Archive &ar, const unsigned int version) | |
{ | |
} | |
BOOST_SERIALIZATION_SPLIT_MEMBER() | |
friend class boost::serialization::access; | |
virtual ~NodeInterface() | |
{} | |
}; | |
template <uint8_t num_elem = 1> | |
class Node; | |
template<uint8_t num_elem> | |
NodeInterface *upgrade_node(const Node<num_elem> &node) | |
{ | |
return new Node<num_elem + 1>; | |
} | |
template<> | |
NodeInterface *upgrade_node(const Node<10> &node) | |
{ | |
return nullptr; | |
} | |
template<uint8_t num_elem> | |
class Node : public NodeInterface | |
{ | |
public: | |
Node(): | |
NodeInterface() | |
{ | |
for (int i = 0; i < num_elem; ++i) | |
children[i] = make_pair(0, nullptr); | |
} | |
pair<uint8_t, NodeInterface*> children[num_elem]; | |
NodeInterface *get_child(const uint8_t in) const override | |
{ | |
assert(in < 10); | |
for (int i = 0; i < num_elem; ++i) | |
{ | |
if (children[i].second && children[i].first == in) | |
{ | |
return children[i].second; | |
} | |
} | |
return nullptr; | |
} | |
NodeInterface *set_child(const uint8_t in) override | |
{ | |
assert(in < 10); | |
for (int i = 0; i < num_elem; ++i) | |
{ | |
if (children[i].second == nullptr) | |
{ | |
auto new_node = new Node; | |
children[i] = make_pair(in, new_node); | |
return new_node; | |
} | |
} | |
return nullptr; | |
} | |
void set_child(const uint8_t in, NodeInterface *child) override | |
{ | |
assert(in < 10); | |
for (int i = 0; i < num_elem; ++i) | |
{ | |
if (children[i].first == in) | |
{ | |
delete children[i].second; | |
children[i].second = child; | |
return; | |
} | |
else if (children[i].second == nullptr) | |
{ | |
children[i] = make_pair(in, child); | |
return; | |
} | |
} | |
} | |
void print(int indention = 0) const override | |
{ | |
string indent_str(indention, ' '); | |
for (auto & child : children) | |
{ | |
if (child.second) | |
{ | |
cout << indent_str << ": " << to_string(child.first) << endl; | |
child.second->print(indention + 2); | |
} | |
} | |
} | |
NodeInterface *upgrade() override | |
{ | |
auto new_node = upgrade_node(*this); | |
if (new_node) | |
{ | |
for (int i = 0; i < num_elem; ++i) | |
{ | |
new_node->set_child(children[i].first, children[i].second); | |
children[i].second = nullptr; | |
} | |
} | |
return new_node; | |
} | |
template <typename Archive> | |
void save(Archive &ar, const unsigned int version) const | |
{ | |
ar & boost::serialization::base_object<NodeInterface>(*this); | |
ar & children; | |
} | |
template <typename Archive> | |
void load(Archive &ar, const unsigned int version) | |
{ | |
ar & boost::serialization::base_object<NodeInterface>(*this); | |
ar & children; | |
} | |
BOOST_SERIALIZATION_SPLIT_MEMBER() | |
friend class boost::serialization::access; | |
~Node() | |
{ | |
for (int i = 0; i < num_elem; ++i) | |
{ | |
if (children[i].second) | |
delete children[i].second; | |
} | |
} | |
}; | |
class Tree | |
{ | |
public: | |
NodeInterface *root; | |
Tree(): | |
root(new Node<>) | |
{} | |
void insert(size_t i) | |
{ | |
auto last_s = root; | |
auto s = root; | |
uint32_t last_i = i; | |
auto temp = root; | |
while ((temp = s->get_child(i%10))) | |
{ | |
last_s = s; | |
last_i = i; | |
s = temp; | |
i /= 10; | |
} | |
while (i > 0) | |
{ | |
auto temp = s->set_child(i % 10); | |
if (temp == nullptr) | |
{ | |
if (s == root) | |
{ | |
s = s->upgrade(); | |
delete root; | |
root = s; | |
last_s = root; | |
} | |
else | |
{ | |
s = s->upgrade(); | |
last_s->set_child(last_i % 10, s); | |
} | |
last_s = s; | |
s = s->set_child(i % 10); | |
} | |
else | |
{ | |
last_s = s; | |
s = temp; | |
} | |
last_i = i; | |
i /= 10; | |
} | |
} | |
void print() const | |
{ | |
root->print(); | |
} | |
template <typename Archive> | |
void save(Archive &ar, const unsigned int version) const | |
{ | |
ar & root; | |
} | |
template <typename Archive> | |
void load(Archive &ar, const unsigned int version) | |
{ | |
ar & root; | |
} | |
BOOST_SERIALIZATION_SPLIT_MEMBER() | |
friend class boost::serialization::access; | |
~Tree() | |
{ | |
delete root; | |
} | |
}; | |
} // Tree namepspace | |
BOOST_CLASS_EXPORT(Tree::Node<1>) | |
BOOST_CLASS_EXPORT(Tree::Node<2>) | |
BOOST_CLASS_EXPORT(Tree::Node<3>) | |
BOOST_CLASS_EXPORT(Tree::Node<4>) | |
BOOST_CLASS_EXPORT(Tree::Node<5>) | |
BOOST_CLASS_EXPORT(Tree::Node<6>) | |
BOOST_CLASS_EXPORT(Tree::Node<7>) | |
BOOST_CLASS_EXPORT(Tree::Node<8>) | |
BOOST_CLASS_EXPORT(Tree::Node<9>) | |
BOOST_CLASS_EXPORT(Tree::Node<10>) | |
//BOOST_CLASS_TRACKING(Tree::NodeInterface, boost::serialization::track_never) | |
//FOO_CLASS_TRACKING(boost::serialization::track_never, (uint8_t num_elem), Tree::Node<num_elem>) | |
//FOO_CLASS_TRACKING(boost::serialization::track_never, (), pair<const uint8_t, Tree::NodeInterface*>) | |
#endif /* TREE_HH */ | |
//================= main.cc ======================= | |
//#include "tree.hh" | |
#include <boost/archive/binary_iarchive.hpp> | |
#include <boost/archive/binary_oarchive.hpp> | |
#include <fstream> | |
#define MAX_NUM 10000000 | |
int main() | |
{ | |
Tree::Tree tree; | |
for (int i = 0; i < MAX_NUM; ++i) | |
tree.insert(i); | |
const char* text_file_name = "/tmp/tree.txt"; | |
{ | |
std::ofstream ofs(text_file_name, ios::binary | ios::out); | |
std::filebuf *fb = ofs.rdbuf(); | |
boost::archive::binary_oarchive ar(*fb, boost::archive::no_tracking); | |
cout << "Start serialization..." << endl; | |
ar & tree; | |
cout << "Serialization done." << endl; | |
} | |
#if 0 | |
{ | |
std::ifstream ifs(text_file_name); | |
boost::archive::binary_iarchive ar(ifs); | |
Tree::Tree tree1; | |
ar & tree1; | |
tree1.print(); | |
} | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment