<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to overview</title><link>https://sourceforge.net/p/libbuffers/wiki/overview/</link><description>Recent changes to overview</description><atom:link href="https://sourceforge.net/p/libbuffers/wiki/overview/feed" rel="self"/><language>en</language><lastBuildDate>Sun, 28 Apr 2013 10:47:46 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/libbuffers/wiki/overview/feed" rel="self" type="application/rss+xml"/><item><title>overview modified by Mark Hobley</title><link>https://sourceforge.net/p/libbuffers/wiki/overview/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;== Overview ==&lt;/p&gt;
&lt;p&gt;The libbuffers library provides support for dynamically allocated buffers. Because buffers can be allocated dynamically, a table, known as the &lt;span&gt;[buffer information table]&lt;/span&gt;, is allocated in &lt;span&gt;[dynamic memory]&lt;/span&gt;. The &lt;span&gt;[buffer information table]&lt;/span&gt; can be resized to accomodate additional buffers as required. A &lt;span&gt;[master record]&lt;/span&gt; is required to track the size and allocation address of the buffer information table.&lt;/p&gt;
&lt;p&gt;== Chunky allocation ==&lt;/p&gt;
&lt;p&gt;The libbuffers library uses a &lt;span&gt;[chunky dynamic allocation]&lt;/span&gt; technique. This reduces operational overhead, because buffers and tables are not being constantly resized as the library is utilized.&lt;/p&gt;
&lt;p&gt;== Initialization ==&lt;/p&gt;
&lt;p&gt;The &lt;span&gt;[initbuffers]&lt;/span&gt; function provides initialization code that must be run in order to utilize the libbuffers library. The &lt;span&gt;[initbuffers]&lt;/span&gt; function creates the &lt;span&gt;[buffer information table]&lt;/span&gt; in &lt;span&gt;[dynamic memory]&lt;/span&gt; and updates the &lt;span&gt;[master record]&lt;/span&gt; with appropriate information.&lt;/p&gt;
&lt;p&gt;== Operation ==&lt;/p&gt;
&lt;p&gt;The &lt;span&gt;[allocateabuffer]&lt;/span&gt; function will dynamically allocate a buffer in memory, making appropriate entries in the &lt;span&gt;[buffer information table]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;== Complications ==&lt;/p&gt;
&lt;p&gt;The library uses a dynamically allocated &lt;span&gt;[buffer information table]&lt;/span&gt;. Because these can be moved around in memory as they become resized, it is not possible for these to hold record locking information directly, because &lt;span&gt;[rwlocks]&lt;/span&gt; become broken as the tables are moved. To work around this, instead of the record locking information being stored directly in the &lt;span&gt;[buffer information table]&lt;/span&gt;, the record locks are separately allocated into &lt;span&gt;[dynamic memory]&lt;/span&gt;, and the &lt;span&gt;[buffer information table]&lt;/span&gt; holds a pointer to the record locking information. This way, when the table is moved, the record locking information remains undisturbed.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mark Hobley</dc:creator><pubDate>Sun, 28 Apr 2013 10:47:46 -0000</pubDate><guid>https://sourceforge.netd4dd50f4d704741b3170c0144bfbb80fd24124fb</guid></item></channel></rss>