GEOS SDK TechDocs
|
|
3.9 Closing Files
|
3.11 File-Access Synchronization
VMGetMapBlock(), VMSetMapBlock()
When they're created, the blocks of a VM file are in no particular order. You will need some way to keep track of VM block handles so you can find each block when you need it. The usual way to do this is with a map block .
A map block is just like any other VM block. Like other blocks, it can be a
standard block, an LMem heap, etc. It is different in only one way: the VM manager keeps track of its handle. By calling the routine
VMGetMapBlock()
, you can get the VM handle of the map block. You can then look inside the map block to get information about the other blocks.
Note that the structure of the VM map block is entirely the concern of the creating geode. The VM manager neither requires nor specifies any internal structure or information content.
To create a map block, allocate a VM block through any of the normal techniques, then pass its VM handle as an argument to
VMSetMapBlock()
. That block will be the new map block. If there already was a map block, the old block will become an ordinary VM block.
In addition to setting a map block, you can set a
map database item
with the command
DBSetMap()
. For details, see the Database chapter.
GEOS SDK TechDocs
|
|
3.9 Closing Files
|
3.11 File-Access Synchronization