<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Devel::RingBuffer::Ring</title>
<link rel="stylesheet" type="text/css" href="../../podstyle.css" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<div class="box">
<h1 class="t1">Devel::RingBuffer</h1>
<table>
<tr>
<td class="label">Description</td>
<td class="cell">shared memory ring buffer for debug/diagnosis of Perl scripts</td>
</tr>
</table>
</div>
<div class="path">
<a href="../../index.html">Devel::RingBuffer</a> > Package Manuals >
Devel-RingBuffer-Ring
</div>
<div>
<a href="./Ring.html">Classdocs</a>
</div>
<div class="pod">
<!-- INDEX START -->
<h3 id="TOP">Index</h3>
<ul>
<li><a href="#NAME">NAME</a></li>
<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
<li><a href="#METHODS">METHODS</a></li>
<li><a href="#SEE_ALSO">SEE ALSO</a></li>
<li><a href="#AUTHOR_COPYRIGHT_AND_LICENSE">AUTHOR, COPYRIGHT, AND LICENSE</a></li>
</ul>
<hr />
<!-- INDEX END -->
<h1 id="NAME">NAME <a href="#TOP" class="toplink"><img alt="^" src="../../up.gif" /></a></h1>
<p>Devel::RingBuffer::Ring - Single ring of a <a href="../RingBuffer.pod.html">Devel::RingBuffer</a></p>
<h1 id="SYNOPSIS">SYNOPSIS <a href="#TOP" class="toplink"><img alt="^" src="../../up.gif" /></a></h1>
<pre> #
# create ringbuffer
#
use Devel::RingBuffer;
use Devel::RingBuffer::TieInt;
my $ringbuf = Devel::RingBuffer->new(
File => 'somefile.trace',
Rings => 20,
Slots => 20,
MessageSize => 256,
GlobalSize => 24 * 1024,
StopOnCreate => 0,
TraceOnCreate => 1) || die "Can't create a ring buffer.";
my $ring = $ringbuf->allocate();
#
# setup the next slot in the ring
#
$depth = $ring->nextSlot();
#
# update the current slot with the new linenumber and timestamp
#
$ring->updateSlot();
#
# free the current slot when we return from its subroutine call
#
$depth = $ring->freeSlot();
</pre><h1 id="DESCRIPTION">DESCRIPTION <a href="#TOP" class="toplink"><img alt="^" src="../../up.gif" /></a></h1>
<p>Provides shared memory structures (using memory mapped files via
<a href="http://search.cpan.org/perldoc?IPC%3A%3AMmap">IPC::Mmap</a> and <a href="../RingBuffer.pod.html">Devel::RingBuffer</a>).</p>
<h1 id="METHODS">METHODS <a href="#TOP" class="toplink"><img alt="^" src="../../up.gif" /></a></h1>
<p>Refer to included classdocs for summary and detailed method descriptions.</p>
<h1 id="SEE_ALSO">SEE ALSO <a href="#TOP" class="toplink"><img alt="^" src="../../up.gif" /></a></h1>
<p><a href="../RingBuffer.pod.html">Devel::RingBuffer</a></p>
<p><a href="http://search.cpan.org/perldoc?Devel%3A%3ASTrace">Devel::STrace</a></p>
<p><a href="http://search.cpan.org/perldoc?IPC%3A%3AMmap">IPC::Mmap</a></p>
<p><a href="http://search.cpan.org/perldoc?perldebguts">perldebguts</a></p>
<p>strace(1) <i>(or truss(1))</i></p>
<h1 id="AUTHOR_COPYRIGHT_AND_LICENSE">AUTHOR, COPYRIGHT, AND LICENSE <a href="#TOP" class="toplink"><img alt="^" src="../../up.gif" /></a></h1>
<p>Dean Arnold <a href="mailto:darnold@presicient.com">mailto:darnold@presicient.com</a></p>
<p>Copyright(C) 2006, Dean Arnold, Presicient Corp., USA.
All rights reserved.</p>
<p>Permission is granted to use this software under the same terms as Perl itself.
Refer to the <a href="http://search.cpan.org/perldoc?perlartistic">Perl Artistic License</a> for details.</p>
</div><div class="footer">generated by <a href="http://search.cpan.org/perldoc?Pod%3A%3AProjectDocs">Pod::ProjectDocs</a></div></body>
</html>