|
Documentation Project 1
|
struct DataBlock { _32 Cnt; _32 Avail; _32 Lock; _32 Size; _8 data[1]; };
|
Members |
Description |
|
_32 Cnt; |
How many elements are used. |
|
_32 Avail; |
How many elements are available in his array. |
|
_32 Lock; |
A simple exchange lock on the data for insert and delete. For thread safety. |
|
_32 Size; |
How big each element of the array is. |
|
_8 data[1]; |
The physical array. |
Data Blocks are like LinkBlocks, and store blocks of data in slab format. If the count of elements exceeds available, the structure is grown, to always contain a continuous array of structures of Size size.
When blocks are deleted, all subsequent blocks are shifted down in the array. So the free blocks are always at the end.
|
Copyright (c) 2010. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|