{"action":"created","issue":{"url":"https://api.github.com/repos/khizmax/libcds/issues/49","repository_url":"https://api.github.com/repos/khizmax/libcds","labels_url":"https://api.github.com/repos/khizmax/libcds/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/khizmax/libcds/issues/49/comments","events_url":"https://api.github.com/repos/khizmax/libcds/issues/49/events","html_url":"https://github.com/khizmax/libcds/pull/49","id":125780547,"number":49,"title":"cache aware queue for multiple producers-consumers","user":{"login":"hardened-steel","id":12482786,"avatar_url":"https://avatars.githubusercontent.com/u/12482786?v=3","gravatar_id":"","url":"https://api.github.com/users/hardened-steel","html_url":"https://github.com/hardened-steel","followers_url":"https://api.github.com/users/hardened-steel/followers","following_url":"https://api.github.com/users/hardened-steel/following{/other_user}","gists_url":"https://api.github.com/users/hardened-steel/gists{/gist_id}","starred_url":"https://api.github.com/users/hardened-steel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hardened-steel/subscriptions","organizations_url":"https://api.github.com/users/hardened-steel/orgs","repos_url":"https://api.github.com/users/hardened-steel/repos","events_url":"https://api.github.com/users/hardened-steel/events{/privacy}","received_events_url":"https://api.github.com/users/hardened-steel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-01-09T20:47:23Z","updated_at":"2016-02-03T19:29:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/khizmax/libcds/pulls/49","html_url":"https://github.com/khizmax/libcds/pull/49","diff_url":"https://github.com/khizmax/libcds/pull/49.diff","patch_url":"https://github.com/khizmax/libcds/pull/49.patch"},"body":"I will try to make an intrusive version, if I understand how it should be implemented.\r\nMay need to change the interface of the container, and to make it richer.\r\n"},"comment":{"url":"https://api.github.com/repos/khizmax/libcds/issues/comments/179419611","html_url":"https://github.com/khizmax/libcds/pull/49#issuecomment-179419611","issue_url":"https://api.github.com/repos/khizmax/libcds/issues/49","id":179419611,"user":{"login":"khizmax","id":7014966,"avatar_url":"https://avatars.githubusercontent.com/u/7014966?v=3","gravatar_id":"","url":"https://api.github.com/users/khizmax","html_url":"https://github.com/khizmax","followers_url":"https://api.github.com/users/khizmax/followers","following_url":"https://api.github.com/users/khizmax/following{/other_user}","gists_url":"https://api.github.com/users/khizmax/gists{/gist_id}","starred_url":"https://api.github.com/users/khizmax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khizmax/subscriptions","organizations_url":"https://api.github.com/users/khizmax/orgs","repos_url":"https://api.github.com/users/khizmax/repos","events_url":"https://api.github.com/users/khizmax/events{/privacy}","received_events_url":"https://api.github.com/users/khizmax/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T19:29:50Z","updated_at":"2016-02-03T19:29:50Z","body":"Good work!\r\n\r\nОсталось две небольшие мелочи:\r\n1. Массовая утечка памяти\r\n2. Откомметировать код: все public-члены должны иметь doxygen-комментарии + коммент на сам класс.\r\n\r\nMemory leaks:\r\nQueue_ReaderWriter::CacheAwareQueue_default\r\n\t    reader count=4 writer count=4 item count=100000... \r\nВсе элементы (400 000) не освобождаются:\r\n\r\n==2657==ERROR: LeakSanitizer: detected memory leaks\r\n\r\nDirect leak of 1600000 byte(s) in 100000 object(s) allocated from:\r\n    #0 0x7f9ff2018c4a in operator new(unsigned long) ../../../../gcc-5.3.0/libsanitizer/asan/asan_new_delete.cc:60\r\n    #1 0x7f9ff356ca4e in allocate /home/khizmax/bin/gcc-5.3/include/c++/5.3.0/ext/new_allocator.h:104\r\n    #2 0x7f9ff356ca4e in New<queue::(anonymous namespace)::Value> ../cds/details/allocator.h:73\r\n    #3 0x7f9ff356ca4e in enqueue ../cds/container/cache_aware_queue.h:214\r\n    #4 0x7f9ff356ca4e in push ../cds/container/cache_aware_queue.h:231\r\n    #5 0x7f9ff356ca4e in test ../tests/unit/queue/queue_reader_writer.cpp:105\r\n    #6 0x7f9ff38b5810 in CppUnitMini::TestThread::run() ../tests/cppunit/thread.cpp:53\r\n    #7 0x7f9ff38b59da in CppUnitMini::TestThread::threadEntryPoint(CppUnitMini::TestThread*) ../tests/cppunit/thread.cpp:39\r\n    #8 0x7f9ff38b5c0b in void boost::_bi::list1<boost::_bi::value<CppUnitMini::TestThread*> >::operator()<void (*)(CppUnitMini::TestThread*), boost::_bi::list0>(boost::_bi::type<void>, void (*&)(CppUnitMini::TestThread*), boost::_bi::list0&, int) /home/khizmax/works/lib/boost_1_58_0/boost/bind/bind.hpp:253\r\n    #9 0x7f9ff38b5c0b in boost::_bi::bind_t<void, void (*)(CppUnitMini::TestThread*), boost::_bi::list1<boost::_bi::value<CppUnitMini::TestThread*> > >::operator()() /home/khizmax/works/lib/boost_1_58_0/boost/bind/bind.hpp:893\r\n    #10 0x7f9ff38b5c0b in boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(CppUnitMini::TestThread*), boost::_bi::list1<boost::_bi::value<CppUnitMini::TestThread*> > > >::run() /home/khizmax/works/lib/boost_1_58_0/boost/thread/detail/thread.hpp:116\r\n    #11 0x7f9ff38c7a2a in thread_proxy (/home/khizmax/works/cds-2-linux/bin/gcc-5-asan-amd64-linux-64/cdsu-queue+0x7b4a2a)\r\n\r\nDirect leak of 1600000 byte(s) in 100000 object(s) allocated from:\r\n    #0 0x7f9ff2018c4a in operator new(unsigned long) ../../../../gcc-5.3.0/libsanitizer/asan/asan_new_delete.cc:60\r\n    #1 0x7f9ff356d6fa in allocate /home/khizmax/bin/gcc-5.3/include/c++/5.3.0/ext/new_allocator.h:104\r\n    #2 0x7f9ff356d6fa in New<queue::(anonymous namespace)::Value> ../cds/details/allocator.h:73\r\n    #3 0x7f9ff356d6fa in enqueue ../cds/container/cache_aware_queue.h:214\r\n    #4 0x7f9ff356d6fa in push ../cds/container/cache_aware_queue.h:231\r\n    #5 0x7f9ff356d6fa in test ../tests/unit/queue/queue_reader_writer.cpp:105\r\n    #6 0x7f9ff38b5810 in CppUnitMini::TestThread::run() ../tests/cppunit/thread.cpp:53\r\n    #7 0x7f9ff38b59da in CppUnitMini::TestThread::threadEntryPoint(CppUnitMini::TestThread*) ../tests/cppunit/thread.cpp:39\r\n    #8 0x7f9ff38b5c0b in void boost::_bi::list1<boost::_bi::value<CppUnitMini::TestThread*> >::operator()<void (*)(CppUnitMini::TestThread*), boost::_bi::list0>(boost::_bi::type<void>, void (*&)(CppUnitMini::TestThread*), boost::_bi::list0&, int) /home/khizmax/works/lib/boost_1_58_0/boost/bind/bind.hpp:253\r\n    #9 0x7f9ff38b5c0b in boost::_bi::bind_t<void, void (*)(CppUnitMini::TestThread*), boost::_bi::list1<boost::_bi::value<CppUnitMini::TestThread*> > >::operator()() /home/khizmax/works/lib/boost_1_58_0/boost/bind/bind.hpp:893\r\n    #10 0x7f9ff38b5c0b in boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(CppUnitMini::TestThread*), boost::_bi::list1<boost::_bi::value<CppUnitMini::TestThread*> > > >::run() /home/khizmax/works/lib/boost_1_58_0/boost/thread/detail/thread.hpp:116\r\n    #11 0x7f9ff38c7a2a in thread_proxy (/home/khizmax/works/cds-2-linux/bin/gcc-5-asan-amd64-linux-64/cdsu-queue+0x7b4a2a)\r\n\r\nDirect leak of 1600000 byte(s) in 100000 object(s) allocated from:\r\n    #0 0x7f9ff2018c4a in operator new(unsigned long) ../../../../gcc-5.3.0/libsanitizer/asan/asan_new_delete.cc:60\r\n    #1 0x7f9ff356dc9f in allocate /home/khizmax/bin/gcc-5.3/include/c++/5.3.0/ext/new_allocator.h:104\r\n    #2 0x7f9ff356dc9f in New<queue::(anonymous namespace)::Value> ../cds/details/allocator.h:73\r\n    #3 0x7f9ff356dc9f in enqueue ../cds/container/cache_aware_queue.h:121\r\n    #4 0x7f9ff356dc9f in enqueue ../cds/container/cache_aware_queue.h:216\r\n    #5 0x7f9ff356dc9f in push ../cds/container/cache_aware_queue.h:231\r\n    #6 0x7f9ff356dc9f in test ../tests/unit/queue/queue_reader_writer.cpp:105\r\n    #7 0x7f9ff38b5810 in CppUnitMini::TestThread::run() ../tests/cppunit/thread.cpp:53\r\n    #8 0x7f9ff38b59da in CppUnitMini::TestThread::threadEntryPoint(CppUnitMini::TestThread*) ../tests/cppunit/thread.cpp:39\r\n    #9 0x7f9ff38b5c0b in void boost::_bi::list1<boost::_bi::value<CppUnitMini::TestThread*> >::operator()<void (*)(CppUnitMini::TestThread*), boost::_bi::list0>(boost::_bi::type<void>, void (*&)(CppUnitMini::TestThread*), boost::_bi::list0&, int) /home/khizmax/works/lib/boost_1_58_0/boost/bind/bind.hpp:253\r\n    #10 0x7f9ff38b5c0b in boost::_bi::bind_t<void, void (*)(CppUnitMini::TestThread*), boost::_bi::list1<boost::_bi::value<CppUnitMini::TestThread*> > >::operator()() /home/khizmax/works/lib/boost_1_58_0/boost/bind/bind.hpp:893\r\n    #11 0x7f9ff38b5c0b in boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(CppUnitMini::TestThread*), boost::_bi::list1<boost::_bi::value<CppUnitMini::TestThread*> > > >::run() /home/khizmax/works/lib/boost_1_58_0/boost/thread/detail/thread.hpp:116\r\n    #12 0x7f9ff38c7a2a in thread_proxy (/home/khizmax/works/cds-2-linux/bin/gcc-5-asan-amd64-linux-64/cdsu-queue+0x7b4a2a)\r\n\r\nDirect leak of 1600000 byte(s) in 100000 object(s) allocated from:\r\n    #0 0x7f9ff2018c4a in operator new(unsigned long) ../../../../gcc-5.3.0/libsanitizer/asan/asan_new_delete.cc:60\r\n    #1 0x7f9ff356cff3 in allocate /home/khizmax/bin/gcc-5.3/include/c++/5.3.0/ext/new_allocator.h:104\r\n    #2 0x7f9ff356cff3 in New<queue::(anonymous namespace)::Value> ../cds/details/allocator.h:73\r\n    #3 0x7f9ff356cff3 in enqueue ../cds/container/cache_aware_queue.h:121\r\n    #4 0x7f9ff356cff3 in enqueue ../cds/container/cache_aware_queue.h:216\r\n    #5 0x7f9ff356cff3 in push ../cds/container/cache_aware_queue.h:231\r\n    #6 0x7f9ff356cff3 in test ../tests/unit/queue/queue_reader_writer.cpp:105\r\n    #7 0x7f9ff38b5810 in CppUnitMini::TestThread::run() ../tests/cppunit/thread.cpp:53\r\n    #8 0x7f9ff38b59da in CppUnitMini::TestThread::threadEntryPoint(CppUnitMini::TestThread*) ../tests/cppunit/thread.cpp:39\r\n    #9 0x7f9ff38b5c0b in void boost::_bi::list1<boost::_bi::value<CppUnitMini::TestThread*> >::operator()<void (*)(CppUnitMini::TestThread*), boost::_bi::list0>(boost::_bi::type<void>, void (*&)(CppUnitMini::TestThread*), boost::_bi::list0&, int) /home/khizmax/works/lib/boost_1_58_0/boost/bind/bind.hpp:253\r\n    #10 0x7f9ff38b5c0b in boost::_bi::bind_t<void, void (*)(CppUnitMini::TestThread*), boost::_bi::list1<boost::_bi::value<CppUnitMini::TestThread*> > >::operator()() /home/khizmax/works/lib/boost_1_58_0/boost/bind/bind.hpp:893\r\n    #11 0x7f9ff38b5c0b in boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(CppUnitMini::TestThread*), boost::_bi::list1<boost::_bi::value<CppUnitMini::TestThread*> > > >::run() /home/khizmax/works/lib/boost_1_58_0/boost/thread/detail/thread.hpp:116\r\n    #12 0x7f9ff38c7a2a in thread_proxy (/home/khizmax/works/cds-2-linux/bin/gcc-5-asan-amd64-linux-64/cdsu-queue+0x7b4a2a)\r\n\r\nSUMMARY: AddressSanitizer: 6400000 byte(s) leaked in 400000 allocation(s). \r\n\r\n\r\n\r\n\r\n"}}