digraph {
rankdir=LR;
node [shape=plaintext];
subgraph cluster__ds_store {
label="DsStore";
graph[style=dotted];
ds_store__seq [label=<
pos | size | type | id |
0 | 4 | | alignment_header |
4 | 32 | BuddyAllocatorHeader | buddy_allocator_header |
>];
ds_store__inst__buddy_allocator_body [label=<
pos | size | type | id |
(buddy_allocator_header.ofs_bookkeeping_info_block + 4) | buddy_allocator_header.len_bookkeeping_info_block | BuddyAllocatorBody | buddy_allocator_body |
>];
ds_store__inst__block_address_mask [label=<
id | value |
block_address_mask | 31 |
>];
subgraph cluster__buddy_allocator_header {
label="DsStore::BuddyAllocatorHeader";
graph[style=dotted];
buddy_allocator_header__seq [label=<
pos | size | type | id |
0 | 4 | | magic |
4 | 4 | u4be | ofs_bookkeeping_info_block |
8 | 4 | u4be | len_bookkeeping_info_block |
12 | 4 | u4be | copy_ofs_bookkeeping_info_block |
16 | 16 | | _unnamed4 |
>];
}
subgraph cluster__buddy_allocator_body {
label="DsStore::BuddyAllocatorBody";
graph[style=dotted];
buddy_allocator_body__seq [label=<
pos | size | type | id |
0 | 4 | u4be | num_blocks |
4 | 4 | | _unnamed1 |
8 | 4 | BlockDescriptor | block_addresses |
repeat num_block_addresses times |
... | 4 | u4be | num_directories |
... | ... | DirectoryEntry | directory_entries |
repeat num_directories times |
... | ... | FreeList | free_lists |
repeat num_free_lists times |
>];
buddy_allocator_body__inst__num_block_addresses [label=<
id | value |
num_block_addresses | 256 |
>];
buddy_allocator_body__inst__num_free_lists [label=<>];
buddy_allocator_body__inst__directories [label=<
pos | size | type | id |
... | 0 | MasterBlockRef | directories |
repeat num_directories times |
>];
subgraph cluster__block_descriptor {
label="DsStore::BuddyAllocatorBody::BlockDescriptor";
graph[style=dotted];
block_descriptor__seq [label=<
pos | size | type | id |
0 | 4 | u4be | address_raw |
>];
block_descriptor__inst__offset [label=<
id | value |
offset | ((address_raw & ~(_root.block_address_mask)) + 4) |
>];
block_descriptor__inst__size [label=<
id | value |
size | (1 << (address_raw & _root.block_address_mask)) |
>];
}
subgraph cluster__directory_entry {
label="DsStore::BuddyAllocatorBody::DirectoryEntry";
graph[style=dotted];
directory_entry__seq [label=<
pos | size | type | id |
0 | 1 | u1 | len_name |
1 | len_name | str(UTF-8) | name |
... | 4 | u4be | block_id |
>];
}
subgraph cluster__free_list {
label="DsStore::BuddyAllocatorBody::FreeList";
graph[style=dotted];
free_list__seq [label=<
pos | size | type | id |
0 | 4 | u4be | counter |
4 | 4 | u4be | offsets |
repeat counter times |
>];
}
}
subgraph cluster__master_block_ref {
label="DsStore::MasterBlockRef";
graph[style=dotted];
master_block_ref__seq [label=<>];
master_block_ref__inst__master_block [label=<
pos | size | type | id |
_parent.block_addresses[_parent.directory_entries[idx].block_id].offset | _parent.block_addresses[_parent.directory_entries[idx].block_id].size | MasterBlock | master_block |
>];
subgraph cluster__master_block {
label="DsStore::MasterBlockRef::MasterBlock";
graph[style=dotted];
master_block__seq [label=<
pos | size | type | id |
0 | 4 | u4be | block_id |
4 | 4 | u4be | num_internal_nodes |
8 | 4 | u4be | num_records |
12 | 4 | u4be | num_nodes |
16 | 4 | u4be | _unnamed4 |
>];
master_block__inst__root_block [label=<
pos | size | type | id |
_root.buddy_allocator_body.block_addresses[block_id].offset | ... | Block | root_block |
>];
}
}
subgraph cluster__block {
label="DsStore::Block";
graph[style=dotted];
block__seq [label=<
pos | size | type | id |
0 | 4 | u4be | mode |
4 | 4 | u4be | counter |
8 | ... | BlockData | data |
repeat counter times |
>];
block__inst__rightmost_block [label=<
pos | size | type | id |
_root.buddy_allocator_body.block_addresses[mode].offset | ... | Block | rightmost_block |
>];
subgraph cluster__block_data {
label="DsStore::Block::BlockData";
graph[style=dotted];
block_data__seq [label=<
pos | size | type | id |
0 | 4 | u4be | block_id |
4 | ... | Record | record |
>];
block_data__inst__block [label=<
pos | size | type | id |
_root.buddy_allocator_body.block_addresses[block_id].offset | ... | Block | block |
>];
subgraph cluster__record {
label="DsStore::Block::BlockData::Record";
graph[style=dotted];
record__seq [label=<
pos | size | type | id |
0 | ... | Ustr | filename |
... | 4 | FourCharCode | structure_type |
... | 4 | str(UTF-8) | data_type |
... | ... | switch (data_type) | value |
>];
record__seq_value_switch [label=<
case | type |
"ustr" | Ustr |
"type" | FourCharCode |
"blob" | RecordBlob |
>];
subgraph cluster__record_blob {
label="DsStore::Block::BlockData::Record::RecordBlob";
graph[style=dotted];
record_blob__seq [label=<
pos | size | type | id |
0 | 4 | u4be | length |
4 | length | | value |
>];
}
subgraph cluster__ustr {
label="DsStore::Block::BlockData::Record::Ustr";
graph[style=dotted];
ustr__seq [label=<
pos | size | type | id |
0 | 4 | u4be | length |
4 | (2 * length) | str(UTF-16BE) | value |
>];
}
subgraph cluster__four_char_code {
label="DsStore::Block::BlockData::Record::FourCharCode";
graph[style=dotted];
four_char_code__seq [label=<
pos | size | type | id |
0 | 4 | str(UTF-8) | value |
>];
}
}
}
}
}
ds_store__seq:buddy_allocator_header_type -> buddy_allocator_header__seq [style=bold];
buddy_allocator_header__seq:ofs_bookkeeping_info_block_type -> ds_store__inst__buddy_allocator_body:buddy_allocator_body_pos [color="#404040"];
buddy_allocator_header__seq:len_bookkeeping_info_block_type -> ds_store__inst__buddy_allocator_body:buddy_allocator_body_size [color="#404040"];
ds_store__inst__buddy_allocator_body:buddy_allocator_body_type -> buddy_allocator_body__seq [style=bold];
buddy_allocator_body__seq:block_addresses_type -> block_descriptor__seq [style=bold];
buddy_allocator_body__inst__num_block_addresses:num_block_addresses_type -> buddy_allocator_body__seq:block_addresses__repeat [color="#404040"];
buddy_allocator_body__seq:directory_entries_type -> directory_entry__seq [style=bold];
buddy_allocator_body__seq:num_directories_type -> buddy_allocator_body__seq:directory_entries__repeat [color="#404040"];
buddy_allocator_body__seq:free_lists_type -> free_list__seq [style=bold];
buddy_allocator_body__inst__num_free_lists:num_free_lists_type -> buddy_allocator_body__seq:free_lists__repeat [color="#404040"];
buddy_allocator_body__inst__directories:directories_type -> master_block_ref__seq [style=bold];
buddy_allocator_body__seq:num_directories_type -> buddy_allocator_body__inst__directories:directories__repeat [color="#404040"];
block_descriptor__seq:address_raw_type -> block_descriptor__inst__offset [color="#404040"];
ds_store__inst__block_address_mask:block_address_mask_type -> block_descriptor__inst__offset [color="#404040"];
block_descriptor__seq:address_raw_type -> block_descriptor__inst__size [color="#404040"];
ds_store__inst__block_address_mask:block_address_mask_type -> block_descriptor__inst__size [color="#404040"];
directory_entry__seq:len_name_type -> directory_entry__seq:name_size [color="#404040"];
free_list__seq:counter_type -> free_list__seq:offsets__repeat [color="#404040"];
block_descriptor__inst__offset:offset_type -> master_block_ref__inst__master_block:master_block_pos [color="#404040"];
block_descriptor__inst__size:size_type -> master_block_ref__inst__master_block:master_block_size [color="#404040"];
master_block_ref__inst__master_block:master_block_type -> master_block__seq [style=bold];
block_descriptor__inst__offset:offset_type -> master_block__inst__root_block:root_block_pos [color="#404040"];
master_block__inst__root_block:root_block_type -> block__seq [style=bold];
block__seq:data_type -> block_data__seq [style=bold];
block__seq:counter_type -> block__seq:data__repeat [color="#404040"];
block_descriptor__inst__offset:offset_type -> block__inst__rightmost_block:rightmost_block_pos [color="#404040"];
block__inst__rightmost_block:rightmost_block_type -> block__seq [style=bold];
block_data__seq:record_type -> record__seq [style=bold];
block_descriptor__inst__offset:offset_type -> block_data__inst__block:block_pos [color="#404040"];
block_data__inst__block:block_type -> block__seq [style=bold];
record__seq:filename_type -> ustr__seq [style=bold];
record__seq:structure_type_type -> four_char_code__seq [style=bold];
record__seq:value_type -> record__seq_value_switch [style=bold];
record__seq_value_switch:case0 -> ustr__seq [style=bold];
record__seq_value_switch:case1 -> four_char_code__seq [style=bold];
record__seq_value_switch:case2 -> record_blob__seq [style=bold];
record__seq:data_type_type -> record__seq:value_type [color="#404040"];
record_blob__seq:length_type -> record_blob__seq:value_size [color="#404040"];
ustr__seq:length_type -> ustr__seq:value_size [color="#404040"];
}