CGI-SpeedyCGI
view release on metacpan or search on metacpan
docs/file_struct.html view on Meta::CPAN
</h2>
<p>
The speedy temp file contains in this order:
<ul>
<li><a href="#header">a header</a>
<li><a href="#slot array">an array of slots</a>
</ul>
Below is a a graphical view of the file structure:
<table border=2 cellpadding=7><tr>
<td bgcolor=white><img src="file_struct.gif" border=0></td>
</tr></table>
<a href="graph_notes.html">How to edit this image</a>
<p>
<h2>
<a name="header">
Header
</a>
</h2>
The header of the file is located at byte-0 within the file. It contains:
<p>
<table>
<tr>
<td rowspan=20> </td>
<td>
create_time
</td>
<td rowspan=20>  </td>
<td>
Time when file was created.
</td>
</tr>
<tr>
<td>
group_head
</td>
<td>
Pointer to a linked list of groups
</td>
</tr>
<tr>
<td>
slot_free
</td>
<td>
Pointer to a linked list of free slots
</td>
</tr>
<tr>
<td>
slots_alloced
</td>
<td>
Number of slots in the slot array.
</td>
</tr>
<tr>
<td>
file_corrupt
</td>
<td>
Boolean - is this file corrupt? This is true if a process locked
this file, but exited or was killed before unlocking it.
</td>
</tr>
<tr>
<td>
file_removed
</td>
<td>
Boolean - has this file been removed from the filesystem?
</td>
</tr>
</table>
<p>
Slots can either be allocated by increasing the slots_alloced and
increasing the file size if necessary, or by grabbing a free slot from
the slot_free linked list.
<h2>
<a name="slot array">
Slot Array
</a>
</h2>
This array is located in the file immediately following the header, and occupies
the rest of the file. The number of slots alloced in this array so far is
recorded in header slots_alloced field.
<p>
Each slot is a union that can contain one of the following types of records:
<ul>
<li><a href="#free slot">Free Slot</a>
<li><a href="#group">Group</a>
<li><a href="#script">Script</a>
<li><a href="#backend">Backend</a>
<li><a href="#frontend">Frontend</a>
<li><a href="#group name">Group Name</a>
</ul>
Most records are arranged into linked lists of slots.
Each slot is identified by its index within the array, starting at 1.
Slot-0 represents the "null" slot and is used to terminate linked lists.
<h2>
<a name="free slot">
Free Slot
</a>
</h2>
This is a slot that is free and can be re-used. It contains:
<p>
<table>
<tr>
<td rowspan=20> </td>
<td>
next_slot
</td>
<td rowspan=20>  </td>
<td>
Pointer to the next free slot in the linked list
</td>
</tr>
</table>
( run in 0.864 second using v1.01-cache-2.11-cpan-800906f7e73 )