Questions tagged [intrusive-containers]
50 questions
1
vote
1 answer
Boost Intrusive Swap
I have a class declared as class MyClass : public list_base_hook>. I also have a list declared as list global_list_MyClass.
I insert 10 nodes into global_list_MyClass using a for loop. My objective is try to swap…

Jimmy
- 153
- 1
- 6
1
vote
1 answer
Windows x64 (Intrusive) Singly Linked List
I'm currently trying to wrap my head around some Windows lookaside lists, and I'm seeing some memory addresses that are confusing me.
From another question I posted, some code was produced, thanks to sergmat (original question):
lkd> !lookaside…

Tony
- 3,587
- 8
- 44
- 77
1
vote
2 answers
Windows singly linked list (_SINGLE_LIST_ENTRY)
I'm just doing some debugging on a Windows 7 crash dump, and I've come across a singly-linked list that I'm not able to fully understand.
Here's the output from WinDBG:
dt _GENERAL_LOOKASIDE_POOL fffff80002a14800 -b
....
0x000 SingleListHead:…

Tony
- 3,587
- 8
- 44
- 77
1
vote
2 answers
Which container to use for String-Interning
My goal is to do string-interning. For this I am looking for a hashed
container class that can do the following:
allocate only one block of memory per node
different userdata size per node
The value type looks like this:
struct String
{
…

Jörg Richter
- 21
- 5
0
votes
0 answers
How to use "msgpack" non-intrusively in c++?
I'm using "msgpack" to serialize my messages.
There is a customized type that was defined in a 3rd party lib's header, I can NOT modify the include file, i.e. I should NOT add a MSGPACK_DEFINE into the declare of this class.
But I know that it is a…

Leon
- 1,489
- 1
- 12
- 31
0
votes
1 answer
C++ STL - Containers implementation
I am currently learning a lot about Intrusive Containers. So I often compare them to the standard containers.
Let's take the std::list for example. I read that this container is usually implemented as a doubly-linked list. But I didn't read anything…

Zweistein
- 293
- 1
- 4
- 11
0
votes
2 answers
Why boost intrusive list 's push_back function requires lvalue?
I am learning intrusive list:
#include
#include
-
#include

eight3
- 125
- 3
0
votes
0 answers
How to hide Boost intrusive list hook ?
In the following code:
using namespace boost::intrusive;
struct Data {
int i;
private:
list_member_hook<> list_node; // How to make this work?
};
using List = list<
Data,
member_hook< Data, list_member_hook<>,
…

tower120
- 5,007
- 6
- 40
- 88
0
votes
1 answer
Two [or more] containers with same underlying data, but different views on the data
MyClass below represents a data structure that I need to be able to search very fast in two ways. So say I store the MyClass in and std::vector so that similar names in it can be quickly deleted and inserted continuously. But, I also need to be able…

Ivan
- 7,448
- 14
- 69
- 134
0
votes
1 answer
Trying to learn boost::intrusive Q5
I have the following program. I built it with gcc-4.9.2 under linux. My questions are:
1) Why does the hashtable seem to be sorted the first time around, but loses the sort after the items are deleted from value?
2) How do I walk the hashtable by…

Ivan
- 7,448
- 14
- 69
- 134
0
votes
0 answers
BOOST::INTRUSIVE Q4
The following program doesn't act the way I expect it to. After executing
values.erase(
std::remove_if(begin(values), end(values), std::mem_fn(&MyClass::bIsMarkedToDelete)));
I would think that values didn't contain any "Mike" and the…

Ivan
- 7,448
- 14
- 69
- 134
0
votes
1 answer
Assigning a new value to a iterator of a intrusive container
While working boost intrusive container splay_set, i have to reset local iterator member variables. Please see sample code below -
#include
using namespace boost::intrusive;
class Obj
{
public:
Obj(){};
…

Manish Shukla
- 562
- 6
- 18
0
votes
2 answers
Trying to learn boost::intrusive Q2
if I uncomment these
//BaseList baselist;
//MemberList memberlist;
outside the loop and comment out the ones inside the loop it crashes. I need to be able to have the baselist (and memberlist) outside any loop. How is this…

Ivan
- 7,448
- 14
- 69
- 134
0
votes
0 answers
Performant list of shared_ptr
I have:
class X
boost::unordered_map of X
List of X - used to timeout element according to timestamp
I need to insert and remove element from list with performance.
I though using intrusive list, so an element can remove itself from the list…

yaron
- 439
- 6
- 16
0
votes
1 answer
C intrusive hash - how is it in any way better than an intrusive list?
I'm working on a C project which defines a hash.h header, containing an intrusive hash structure and its interface, as well as a list.h header containing an intrusive list and its interface.
The hash is implemented using lists, and there are no…

bsky
- 19,326
- 49
- 155
- 270