• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Index header:
2num_entries: 8
3num_bytes: 52
4this_id: 1
5table_len: 64k
6
7head: 0x90000004
8tail: 0x90000000
9
10Address: 0xa0010007
11Address: 0xa0010003
12Address: 0xa001000b
13Address: 0xa001000a
14Address: 0xa0010009
15Address: 0xa0010006
16Address: 0xa0010005
17Address: 0xa0010002
18
19
20-------------------------------
21
22entry:
23Address: 0xa0010007
24hash: 0xcb30d119
25next: 0
26rankings_node: 0x90000004
27key_len: 5
28long_key: 0
29data_size[0]: 4
30data_addr[0]: 0xa0010008
31key: "fifth"
32
33rankings:
34Address: 0x90000004
35next: 0x90000001
36prev: 0x90000004
37contents: 0xa0010007
38dirty: 0
39pointer: 0
40
41-------------------------------
42
43entry:
44Address: 0xa0010003
45hash: 0x090fbce3
46next: 0
47rankings_node: 0x90000001
48key_len: 6
49long_key: 0
50data_size[0]: 4
51data_addr[0]: 0xa0010004
52key: "second"
53
54rankings:
55Address: 0x90000001
56next: 0x90000007
57prev: 0x90000004
58contents: 0xa0010003
59dirty: 0
60pointer: 0
61
62-------------------------------
63
64entry:
65Address: 0xa001000b
66hash: 0xad80b702
67next: 0
68rankings_node: 0x90000007
69key_len: 5
70long_key: 0
71data_size: 0's
72data_addr: 0's
73key: "eight"
74
75rankings:
76Address: 0x90000007
77next: 0x90000006
78prev: 0x90000001
79contents: 0xa001000b
80dirty: 0
81pointer: 0
82
83-------------------------------
84
85entry:
86Address: 0xa001000a
87hash: 0xfdae1d2a
88next: 0
89rankings_node: 0x90000006
90key_len: 7
91long_key: 0
92data_size: 0's
93data_addr: 0's
94key: "seventh"
95
96rankings:
97Address: 0x90000006
98next: 0x90000005
99prev: 0x90000007
100contents: 0xa001000a
101dirty: 0
102pointer: 0
103
104-------------------------------
105
106entry:
107Address: 0xa0010009
108hash: 0x2129e026
109next: 0
110rankings_node: 0x90000005
111key_len: 5
112long_key: 0
113data_size: 0's
114data_addr: 0's
115key: "sixth"
116
117rankings:
118Address: 0x90000005
119next: 0x90000003
120prev: 0x90000006
121contents: 0xa0010009
122dirty: 0
123pointer: 0
124
125-------------------------------
126
127entry:
128Address: 0xa0010006
129hash: 0x3d9011cc
130next: 0
131rankings_node: 0x90000003
132key_len: 6
133long_key: 0
134data_size: 0's
135data_addr: 0's
136key: "fourth"
137
138rankings:
139Address: 0x90000003
140next: 0x90000002
141prev: 0x90000005
142contents: 0xa0010006
143dirty: 0
144pointer: 0
145
146-------------------------------
147
148entry:
149Address: 0xa0010005
150hash: 0x8f04b77c
151next: 0
152rankings_node: 0x90000002
153key_len: 5
154long_key: 0
155data_size: 0's
156data_addr: 0's
157key: "third"
158
159rankings:
160Address: 0x90000002
161next: 0x90000001        <--------- wrong
162prev: 0x90000003
163contents: 0xa0010005
164dirty: 0
165pointer: 0
166
167-------------------------------
168
169entry:
170Address: 0xa0010002
171hash: 0x0138974a
172next: 0
173rankings_node: 0x90000000
174key_len: 5
175long_key: 0
176data_size: 0's
177data_addr: 0's
178key: "first"
179
180rankings:
181Address: 0x90000000
182next: 0x90000000
183prev: 0x90000002
184contents: 0xa0010002
185dirty: 0
186pointer: 0
187
188==============================
189
190Generated with:
191
192disk_cache::Entry *entry;
193ASSERT_TRUE(cache_->CreateEntry("first", &entry));
194entry->Close();
195
196char buffer[] = "abcd";
197ASSERT_TRUE(cache_->CreateEntry("second", &entry));
198entry->WriteData(0, 0, buffer, 4, NULL, false);
199entry->Close();
200
201ASSERT_TRUE(cache_->CreateEntry("third", &entry));
202entry->Close();
203
204ASSERT_TRUE(cache_->CreateEntry("fourth", &entry));
205entry->Close();
206
207ASSERT_TRUE(cache_->CreateEntry("fifth", &entry));
208entry->WriteData(0, 0, buffer, 4, NULL, false);
209entry->Close();
210
211ASSERT_TRUE(cache_->CreateEntry("sixth", &entry));
212entry->Close();
213
214ASSERT_TRUE(cache_->CreateEntry("seventh", &entry));
215entry->Close();
216
217ASSERT_TRUE(cache_->CreateEntry("eight", &entry));
218entry->Close();
219
220ASSERT_TRUE(cache_->OpenEntry("second", &entry));
221entry->ReadData(0, 0, buffer, 4, NULL);        <--- fix the values*
222entry->Close();
223
224ASSERT_TRUE(cache_->OpenEntry("fifth", &entry));
225entry->ReadData(0, 0, buffer, 4, NULL);
226entry->Close();
227
228* break on Rankings::Remove() and edit the values before they are saved.