Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ready] ellen bintree nogc #104

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

[Ready] ellen bintree nogc #104

wants to merge 11 commits into from

Conversation

gfuf
Copy link

@gfuf gfuf commented Dec 27, 2017

Как стресс тестировать дерево, для этого типа контейнера нет тестов. Нужно ли использовать set ?

@gfuf gfuf changed the title ellen bintree nogc [WIP: need help] ellen bintree nogc Jan 2, 2018
@eugenyk
Copy link
Contributor

eugenyk commented Jan 8, 2018

Пока использовать test\stress\map\map - только find_string

@gfuf gfuf changed the title [WIP: need help] ellen bintree nogc [WIP] ellen bintree nogc Jan 10, 2018
@gfuf
Copy link
Author

gfuf commented Jan 12, 2018

find_string содержит метод clean. При комментировании этого метода, стресс тесты работают. Как быть ?

@gfuf gfuf changed the title [WIP] ellen bintree nogc [WIP need help] ellen bintree nogc Jan 12, 2018
@khizmax
Copy link
Owner

khizmax commented Jan 12, 2018

Реализовать этот метод - удаление всех элементов из дерева.
Этот метод должен вызываться из деструктора дерева, иначе по сути получается, что деструктор объекта не чистит память - memory leaks. В intrusive-варианте clear() для каждого элемента дерева должен вызывать внешний функтор-disposer - см. например здесь -http://libcds.sourceforge.net/doc/cds-api/classcds_1_1intrusive_1_1_michael_hash_set_3_01cds_1_1gc_1_1nogc_00_01_ordered_list_00_01_traits_01_4.html#ac08c379523b0a481fee24084b1e75a5f

Для container-варианта вызывается деаллокация нод.

@gfuf
Copy link
Author

gfuf commented Jan 12, 2018

спасибо

@gfuf gfuf changed the title [WIP need help] ellen bintree nogc [WIP] ellen bintree nogc Jan 12, 2018
@gfuf gfuf changed the title [WIP] ellen bintree nogc [READY] ellen bintree nogc Jan 14, 2018
@gfuf gfuf changed the title [READY] ellen bintree nogc [Ready] ellen bintree nogc Jan 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants