summaryrefslogtreecommitdiffstats
path: root/ctdb/lib/talloc/talloc.3.html
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-05-02 07:32:04 +1000
committerAndrew Tridgell <tridge@samba.org>2007-05-02 07:32:04 +1000
commit169f12940462da90d6cdbbd1c8f170fa978d959a (patch)
treebb9a82c2e458f6149939720e9291f9e2b05985bd /ctdb/lib/talloc/talloc.3.html
parent3a05ad1402c20df868abb2aeb56a6d9e3be1f884 (diff)
merge latest versions of lib/replace, lib/talloc, lib/tdb and lib/events into ctdb bzr tree
(This used to be ctdb commit eaea8a9fa8d2f5e08f3af619fa1008a663f39053)
Diffstat (limited to 'ctdb/lib/talloc/talloc.3.html')
-rw-r--r--ctdb/lib/talloc/talloc.3.html78
1 files changed, 39 insertions, 39 deletions
diff --git a/ctdb/lib/talloc/talloc.3.html b/ctdb/lib/talloc/talloc.3.html
index 160afa03e4..7d0129d30c 100644
--- a/ctdb/lib/talloc/talloc.3.html
+++ b/ctdb/lib/talloc/talloc.3.html
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>talloc</title><meta name="generator" content="DocBook XSL Stylesheets V1.71.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2478266"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>talloc &#8212; hierarchical reference counted memory pool system with destructors</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">#include &lt;talloc/talloc.h&gt;</pre></div><div class="refsect1" lang="en"><a name="id2517036"></a><h2>DESCRIPTION</h2><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>talloc</title><meta name="generator" content="DocBook XSL Stylesheets V1.71.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2478730"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>talloc &#8212; hierarchical reference counted memory pool system with destructors</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">#include &lt;talloc/talloc.h&gt;</pre></div><div class="refsect1" lang="en"><a name="id2517362"></a><h2>DESCRIPTION</h2><p>
If you are used to talloc from Samba3 then please read this
carefully, as talloc has changed a lot.
</p><p>
@@ -30,10 +30,10 @@
If you find this confusing, then I suggest you run the <code class="literal">testsuite</code> program to watch talloc
in action. You may also like to add your own tests to <code class="literal">testsuite.c</code> to clarify how some
particular situation is handled.
- </p></div><div class="refsect1" lang="en"><a name="id2478366"></a><h2>TALLOC API</h2><p>
+ </p></div><div class="refsect1" lang="en"><a name="id2478829"></a><h2>TALLOC API</h2><p>
The following is a complete guide to the talloc API. Read it all at
least twice.
- </p><div class="refsect2" lang="en"><a name="id2478375"></a><h3>(type *)talloc(const void *ctx, type);</h3><p>
+ </p><div class="refsect2" lang="en"><a name="id2478838"></a><h3>(type *)talloc(const void *ctx, type);</h3><p>
The talloc() macro is the core of the talloc library. It takes a
memory <span class="italic">ctx</span> and a <span class="italic">type</span>, and returns a pointer to a new
area of memory of the given <span class="italic">type</span>.
@@ -48,18 +48,18 @@
</p><p>
The <span class="italic">ctx</span> argument to talloc()
can be NULL, in which case a new top level context is created.
- </p></div><div class="refsect2" lang="en"><a name="id2478439"></a><h3>void *talloc_size(const void *ctx, size_t size);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2478902"></a><h3>void *talloc_size(const void *ctx, size_t size);</h3><p>
The function talloc_size() should be used when you don't have a
convenient type to pass to talloc(). Unlike talloc(), it is not
type safe (as it returns a void *), so you are on your own for
type checking.
- </p></div><div class="refsect2" lang="en"><a name="id2478452"></a><h3>(typeof(ptr)) talloc_ptrtype(const void *ctx, ptr);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2478915"></a><h3>(typeof(ptr)) talloc_ptrtype(const void *ctx, ptr);</h3><p>
The talloc_ptrtype() macro should be used when you have a pointer and
want to allocate memory to point at with this pointer. When compiling
with gcc &gt;= 3 it is typesafe. Note this is a wrapper of talloc_size()
and talloc_get_name() will return the current location in the source file.
and not the type.
- </p></div><div class="refsect2" lang="en"><a name="id2478467"></a><h3>int talloc_free(void *ptr);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2478930"></a><h3>int talloc_free(void *ptr);</h3><p>
The talloc_free() function frees a piece of talloc memory, and
all its children. You can call talloc_free() on any pointer
returned by talloc().
@@ -143,14 +143,14 @@
free will be ignored. This would be a pointless operation
anyway, as the destructor is only called when the memory is just
about to go away.
- </p></div><div class="refsect2" lang="en"><a name="id2479422"></a><h3>int talloc_increase_ref_count(const void *<span class="italic">ptr</span>);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2479748"></a><h3>int talloc_increase_ref_count(const void *<span class="italic">ptr</span>);</h3><p>
The talloc_increase_ref_count(<span class="italic">ptr</span>) function is exactly equivalent to:
</p><pre class="programlisting">talloc_reference(NULL, ptr);</pre><p>
You can use either syntax, depending on which you think is
clearer in your code.
</p><p>
It returns 0 on success and -1 on failure.
- </p></div><div class="refsect2" lang="en"><a name="id2479459"></a><h3>size_t talloc_reference_count(const void *<span class="italic">ptr</span>);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2479785"></a><h3>size_t talloc_reference_count(const void *<span class="italic">ptr</span>);</h3><p>
Return the number of references to the pointer.
</p></div><div class="refsect2" lang="en"><a name="talloc_set_name"></a><h3>void talloc_set_name(const void *ptr, const char *fmt, ...);</h3><p>
Each talloc pointer has a "name". The name is used principally
@@ -173,7 +173,7 @@
Note that multiple calls to talloc_set_name() will allocate more
memory without releasing the name. All of the memory is released
when the ptr is freed using talloc_free().
- </p></div><div class="refsect2" lang="en"><a name="id2479578"></a><h3>void talloc_set_name_const(const void *<span class="italic">ptr</span>, const char *<span class="italic">name</span>);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2479904"></a><h3>void talloc_set_name_const(const void *<span class="italic">ptr</span>, const char *<span class="italic">name</span>);</h3><p>
The function talloc_set_name_const() is just like
talloc_set_name(), but it takes a string constant, and is much
faster. It is extensively used by the "auto naming" macros, such
@@ -184,27 +184,27 @@
ptr. This means you must not pass a <span class="italic">name</span> pointer to memory that will
disappear before <span class="italic">ptr</span> is freed
with talloc_free().
- </p></div><div class="refsect2" lang="en"><a name="id2479622"></a><h3>void *talloc_named(const void *<span class="italic">ctx</span>, size_t <span class="italic">size</span>, const char *<span class="italic">fmt</span>, ...);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2479948"></a><h3>void *talloc_named(const void *<span class="italic">ctx</span>, size_t <span class="italic">size</span>, const char *<span class="italic">fmt</span>, ...);</h3><p>
The talloc_named() function creates a named talloc pointer. It
is equivalent to:
</p><pre class="programlisting">ptr = talloc_size(ctx, size);
-talloc_set_name(ptr, fmt, ....);</pre></div><div class="refsect2" lang="en"><a name="id2479657"></a><h3>void *talloc_named_const(const void *<span class="italic">ctx</span>, size_t <span class="italic">size</span>, const char *<span class="italic">name</span>);</h3><p>
+talloc_set_name(ptr, fmt, ....);</pre></div><div class="refsect2" lang="en"><a name="id2479983"></a><h3>void *talloc_named_const(const void *<span class="italic">ctx</span>, size_t <span class="italic">size</span>, const char *<span class="italic">name</span>);</h3><p>
This is equivalent to:
</p><pre class="programlisting">ptr = talloc_size(ctx, size);
-talloc_set_name_const(ptr, name);</pre></div><div class="refsect2" lang="en"><a name="id2479692"></a><h3>const char *talloc_get_name(const void *<span class="italic">ptr</span>);</h3><p>
+talloc_set_name_const(ptr, name);</pre></div><div class="refsect2" lang="en"><a name="id2480018"></a><h3>const char *talloc_get_name(const void *<span class="italic">ptr</span>);</h3><p>
This returns the current name for the given talloc pointer,
<span class="italic">ptr</span>. See <a href="#talloc_set_name" title="void talloc_set_name(const void *ptr, const char *fmt, ...);">&#8220;<span class="quote">talloc_set_name()</span>&#8221;</a>
for details.
- </p></div><div class="refsect2" lang="en"><a name="id2479723"></a><h3>void *talloc_init(const char *<span class="italic">fmt</span>, ...);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2480049"></a><h3>void *talloc_init(const char *<span class="italic">fmt</span>, ...);</h3><p>
This function creates a zero length named talloc context as a top
level context. It is equivalent to:
- </p><pre class="programlisting">talloc_named(NULL, 0, fmt, ...);</pre></div><div class="refsect2" lang="en"><a name="id2479746"></a><h3>void *talloc_new(void *<span class="italic">ctx</span>);</h3><p>
+ </p><pre class="programlisting">talloc_named(NULL, 0, fmt, ...);</pre></div><div class="refsect2" lang="en"><a name="id2480072"></a><h3>void *talloc_new(void *<span class="italic">ctx</span>);</h3><p>
This is a utility macro that creates a new memory context hanging
off an exiting context, automatically naming it "talloc_new:
__location__" where __location__ is the source line it is called
from. It is particularly useful for creating a new temporary
working context.
- </p></div><div class="refsect2" lang="en"><a name="id2526437"></a><h3>(<span class="italic">type</span> *)talloc_realloc(const void *<span class="italic">ctx</span>, void *<span class="italic">ptr</span>, <span class="italic">type</span>, <span class="italic">count</span>);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2526763"></a><h3>(<span class="italic">type</span> *)talloc_realloc(const void *<span class="italic">ctx</span>, void *<span class="italic">ptr</span>, <span class="italic">type</span>, <span class="italic">count</span>);</h3><p>
The talloc_realloc() macro changes the size of a talloc pointer.
It has the following equivalences:
</p><pre class="programlisting">talloc_realloc(ctx, NULL, type, 1) ==&gt; talloc(ctx, type);
@@ -216,10 +216,10 @@ talloc_realloc(ctx, ptr, type, 0) ==&gt; talloc_free(ptr);</pre><p>
talloc_realloc() returns the new pointer, or NULL on failure.
The call will fail either due to a lack of memory, or because the
pointer has more than one parent (see <a href="#talloc_reference" title="void *talloc_reference(const void *ctx, const void *ptr);">&#8220;<span class="quote">talloc_reference()</span>&#8221;</a>).
- </p></div><div class="refsect2" lang="en"><a name="id2526515"></a><h3>void *talloc_realloc_size(const void *ctx, void *ptr, size_t size);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2526841"></a><h3>void *talloc_realloc_size(const void *ctx, void *ptr, size_t size);</h3><p>
the talloc_realloc_size() function is useful when the type is not
known so the type-safe talloc_realloc() cannot be used.
- </p></div><div class="refsect2" lang="en"><a name="id2526527"></a><h3>TYPE *talloc_steal(const void *<span class="italic">new_ctx</span>, const TYPE *<span class="italic">ptr</span>);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2526853"></a><h3>TYPE *talloc_steal(const void *<span class="italic">new_ctx</span>, const TYPE *<span class="italic">ptr</span>);</h3><p>
The talloc_steal() function changes the parent context of a
talloc pointer. It is typically used when the context that the
pointer is currently a child of is going to be freed and you wish
@@ -232,14 +232,14 @@ talloc_realloc(ctx, ptr, type, 0) ==&gt; talloc_free(ptr);</pre><p>
relationship if you are not careful with talloc_steal(). No
guarantees are provided as to your sanity or the safety of your
data if you do this.
- </p></div><div class="refsect2" lang="en"><a name="id2526564"></a><h3>TYPE *talloc_move(const void *<span class="italic">new_ctx</span>, TYPE **<span class="italic">ptr</span>);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2526890"></a><h3>TYPE *talloc_move(const void *<span class="italic">new_ctx</span>, TYPE **<span class="italic">ptr</span>);</h3><p>
The talloc_move() function is a wrapper around
talloc_steal() which zeros the source pointer after the
move. This avoids a potential source of bugs where a
programmer leaves a pointer in two structures, and uses the
pointer from the old structure after it has been moved to a
new one.
- </p></div><div class="refsect2" lang="en"><a name="id2526590"></a><h3>size_t talloc_total_size(const void *<span class="italic">ptr</span>);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2526916"></a><h3>size_t talloc_total_size(const void *<span class="italic">ptr</span>);</h3><p>
The talloc_total_size() function returns the total size in bytes
used by this pointer and all child pointers. Mostly useful for
debugging.
@@ -247,7 +247,7 @@ talloc_realloc(ctx, ptr, type, 0) ==&gt; talloc_free(ptr);</pre><p>
Passing NULL is allowed, but it will only give a meaningful
result if talloc_enable_leak_report() or
talloc_enable_leak_report_full() has been called.
- </p></div><div class="refsect2" lang="en"><a name="id2526614"></a><h3>size_t talloc_total_blocks(const void *<span class="italic">ptr</span>);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2526940"></a><h3>size_t talloc_total_blocks(const void *<span class="italic">ptr</span>);</h3><p>
The talloc_total_blocks() function returns the total memory block
count used by this pointer and all child pointers. Mostly useful
for debugging.
@@ -331,79 +331,79 @@ p1 contains 18 bytes in 7 blocks (ref 0)
x3 contains 1 bytes in 1 blocks (ref 0)
x2 contains 1 bytes in 1 blocks (ref 0)
x1 contains 1 bytes in 1 blocks (ref 0)
- </pre></div><div class="refsect2" lang="en"><a name="id2526922"></a><h3>(<span class="italic">type</span> *)talloc_zero(const void *<span class="italic">ctx</span>, <span class="italic">type</span>);</h3><p>
+ </pre></div><div class="refsect2" lang="en"><a name="id2527248"></a><h3>(<span class="italic">type</span> *)talloc_zero(const void *<span class="italic">ctx</span>, <span class="italic">type</span>);</h3><p>
The talloc_zero() macro is equivalent to:
</p><pre class="programlisting">ptr = talloc(ctx, type);
-if (ptr) memset(ptr, 0, sizeof(type));</pre></div><div class="refsect2" lang="en"><a name="id2526956"></a><h3>void *talloc_zero_size(const void *<span class="italic">ctx</span>, size_t <span class="italic">size</span>)</h3><p>
+if (ptr) memset(ptr, 0, sizeof(type));</pre></div><div class="refsect2" lang="en"><a name="id2527281"></a><h3>void *talloc_zero_size(const void *<span class="italic">ctx</span>, size_t <span class="italic">size</span>)</h3><p>
The talloc_zero_size() function is useful when you don't have a
known type.
- </p></div><div class="refsect2" lang="en"><a name="id2526977"></a><h3>void *talloc_memdup(const void *<span class="italic">ctx</span>, const void *<span class="italic">p</span>, size_t size);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2527304"></a><h3>void *talloc_memdup(const void *<span class="italic">ctx</span>, const void *<span class="italic">p</span>, size_t size);</h3><p>
The talloc_memdup() function is equivalent to:
</p><pre class="programlisting">ptr = talloc_size(ctx, size);
-if (ptr) memcpy(ptr, p, size);</pre></div><div class="refsect2" lang="en"><a name="id2527006"></a><h3>char *talloc_strdup(const void *<span class="italic">ctx</span>, const char *<span class="italic">p</span>);</h3><p>
+if (ptr) memcpy(ptr, p, size);</pre></div><div class="refsect2" lang="en"><a name="id2527332"></a><h3>char *talloc_strdup(const void *<span class="italic">ctx</span>, const char *<span class="italic">p</span>);</h3><p>
The talloc_strdup() function is equivalent to:
</p><pre class="programlisting">ptr = talloc_size(ctx, strlen(p)+1);
if (ptr) memcpy(ptr, p, strlen(p)+1);</pre><p>
This function sets the name of the new pointer to the passed
string. This is equivalent to:
- </p><pre class="programlisting">talloc_set_name_const(ptr, ptr)</pre></div><div class="refsect2" lang="en"><a name="id2527046"></a><h3>char *talloc_strndup(const void *<span class="italic">t</span>, const char *<span class="italic">p</span>, size_t <span class="italic">n</span>);</h3><p>
+ </p><pre class="programlisting">talloc_set_name_const(ptr, ptr)</pre></div><div class="refsect2" lang="en"><a name="id2527372"></a><h3>char *talloc_strndup(const void *<span class="italic">t</span>, const char *<span class="italic">p</span>, size_t <span class="italic">n</span>);</h3><p>
The talloc_strndup() function is the talloc equivalent of the C
library function strndup(3).
</p><p>
This function sets the name of the new pointer to the passed
string. This is equivalent to:
- </p><pre class="programlisting">talloc_set_name_const(ptr, ptr)</pre></div><div class="refsect2" lang="en"><a name="id2527086"></a><h3>char *talloc_vasprintf(const void *<span class="italic">t</span>, const char *<span class="italic">fmt</span>, va_list <span class="italic">ap</span>);</h3><p>
+ </p><pre class="programlisting">talloc_set_name_const(ptr, ptr)</pre></div><div class="refsect2" lang="en"><a name="id2527412"></a><h3>char *talloc_vasprintf(const void *<span class="italic">t</span>, const char *<span class="italic">fmt</span>, va_list <span class="italic">ap</span>);</h3><p>
The talloc_vasprintf() function is the talloc equivalent of the C
library function vasprintf(3).
- </p></div><div class="refsect2" lang="en"><a name="id2527114"></a><h3>char *talloc_asprintf(const void *<span class="italic">t</span>, const char *<span class="italic">fmt</span>, ...);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2527441"></a><h3>char *talloc_asprintf(const void *<span class="italic">t</span>, const char *<span class="italic">fmt</span>, ...);</h3><p>
The talloc_asprintf() function is the talloc equivalent of the C
library function asprintf(3).
</p><p>
This function sets the name of the new pointer to the passed
string. This is equivalent to:
- </p><pre class="programlisting">talloc_set_name_const(ptr, ptr)</pre></div><div class="refsect2" lang="en"><a name="id2527148"></a><h3>char *talloc_asprintf_append(char *s, const char *fmt, ...);</h3><p>
+ </p><pre class="programlisting">talloc_set_name_const(ptr, ptr)</pre></div><div class="refsect2" lang="en"><a name="id2527475"></a><h3>char *talloc_asprintf_append(char *s, const char *fmt, ...);</h3><p>
The talloc_asprintf_append() function appends the given formatted
string to the given string.
- </p></div><div class="refsect2" lang="en"><a name="id2527160"></a><h3>(type *)talloc_array(const void *ctx, type, uint_t count);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2527486"></a><h3>(type *)talloc_array(const void *ctx, type, uint_t count);</h3><p>
The talloc_array() macro is equivalent to:
</p><pre class="programlisting">(type *)talloc_size(ctx, sizeof(type) * count);</pre><p>
except that it provides integer overflow protection for the
multiply, returning NULL if the multiply overflows.
- </p></div><div class="refsect2" lang="en"><a name="id2527183"></a><h3>void *talloc_array_size(const void *ctx, size_t size, uint_t count);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2527509"></a><h3>void *talloc_array_size(const void *ctx, size_t size, uint_t count);</h3><p>
The talloc_array_size() function is useful when the type is not
known. It operates in the same way as talloc_array(), but takes a
size instead of a type.
- </p></div><div class="refsect2" lang="en"><a name="id2527196"></a><h3>(typeof(ptr)) talloc_array_ptrtype(const void *ctx, ptr, uint_t count);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2527522"></a><h3>(typeof(ptr)) talloc_array_ptrtype(const void *ctx, ptr, uint_t count);</h3><p>
The talloc_ptrtype() macro should be used when you have a pointer to an array
and want to allocate memory of an array to point at with this pointer. When compiling
with gcc &gt;= 3 it is typesafe. Note this is a wrapper of talloc_array_size()
and talloc_get_name() will return the current location in the source file.
and not the type.
- </p></div><div class="refsect2" lang="en"><a name="id2527212"></a><h3>void *talloc_realloc_fn(const void *ctx, void *ptr, size_t size)</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2527538"></a><h3>void *talloc_realloc_fn(const void *ctx, void *ptr, size_t size)</h3><p>
This is a non-macro version of talloc_realloc(), which is useful
as libraries sometimes want a realloc function pointer. A
realloc(3) implementation encapsulates the functionality of
malloc(3), free(3) and realloc(3) in one call, which is why it is
useful to be able to pass around a single function pointer.
- </p></div><div class="refsect2" lang="en"><a name="id2527227"></a><h3>void *talloc_autofree_context(void);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2527554"></a><h3>void *talloc_autofree_context(void);</h3><p>
This is a handy utility function that returns a talloc context
which will be automatically freed on program exit. This can be
used to reduce the noise in memory leak reports.
- </p></div><div class="refsect2" lang="en"><a name="id2527240"></a><h3>void *talloc_check_name(const void *ptr, const char *name);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2527566"></a><h3>void *talloc_check_name(const void *ptr, const char *name);</h3><p>
This function checks if a pointer has the specified <span class="italic">name</span>. If it does then the pointer is
returned. It it doesn't then NULL is returned.
- </p></div><div class="refsect2" lang="en"><a name="id2527258"></a><h3>(type *)talloc_get_type(const void *ptr, type);</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2527584"></a><h3>(type *)talloc_get_type(const void *ptr, type);</h3><p>
This macro allows you to do type checking on talloc pointers. It
is particularly useful for void* private pointers. It is
equivalent to this:
- </p><pre class="programlisting">(type *)talloc_check_name(ptr, #type)</pre></div><div class="refsect2" lang="en"><a name="id2527277"></a><h3>talloc_set_type(const void *ptr, type);</h3><p>
+ </p><pre class="programlisting">(type *)talloc_check_name(ptr, #type)</pre></div><div class="refsect2" lang="en"><a name="id2527603"></a><h3>talloc_set_type(const void *ptr, type);</h3><p>
This macro allows you to force the name of a pointer to be a
particular <span class="emphasis"><em>type</em></span>. This can be
used in conjunction with talloc_get_type() to do type checking on
void* pointers.
</p><p>
It is equivalent to this:
- </p><pre class="programlisting">talloc_set_name_const(ptr, #type)</pre></div></div><div class="refsect1" lang="en"><a name="id2527304"></a><h2>PERFORMANCE</h2><p>
+ </p><pre class="programlisting">talloc_set_name_const(ptr, #type)</pre></div></div><div class="refsect1" lang="en"><a name="id2527631"></a><h2>PERFORMANCE</h2><p>
All the additional features of talloc(3) over malloc(3) do come at a
price. We have a simple performance test in Samba4 that measures
talloc() versus malloc() performance, and it seems that talloc() is
@@ -411,10 +411,10 @@ if (ptr) memcpy(ptr, p, strlen(p)+1);</pre><p>
Samba, the great reduction in code complexity that we get by using
talloc makes this worthwhile, especially as the total overhead of
talloc/malloc in Samba is already quite small.
- </p></div><div class="refsect1" lang="en"><a name="id2527322"></a><h2>SEE ALSO</h2><p>
+ </p></div><div class="refsect1" lang="en"><a name="id2527648"></a><h2>SEE ALSO</h2><p>
malloc(3), strndup(3), vasprintf(3), asprintf(3),
<a href="http://talloc.samba.org/" target="_top">http://talloc.samba.org/</a>
- </p></div><div class="refsect1" lang="en"><a name="id2527336"></a><h2>COPYRIGHT/LICENSE</h2><p>
+ </p></div><div class="refsect1" lang="en"><a name="id2527662"></a><h2>COPYRIGHT/LICENSE</h2><p>
Copyright (C) Andrew Tridgell 2004
</p><p>
This program is free software; you can redistribute it and/or modify