~attente/glib/gbytesicon

« back to all changes in this revision

Viewing changes to docs/reference/glib/html/glib-Memory-Slices.html

  • Committer: Package Import Robot
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2012-11-28 14:38:35 UTC
  • mfrom: (172.1.6 experimental)
  • Revision ID: package-import@ubuntu.com-20121128143835-at37o4ozls05rkgf
Tags: 2.34.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
<p>
74
74
To achieve these goals, the slice allocator uses a sophisticated,
75
75
layered design that has been inspired by Bonwick's slab allocator
76
 
<a href="#ftn.idp11399520" class="footnote"><sup class="footnote"><a name="idp11399520"></a>[1]</sup></a>.
 
76
<a href="#ftn.idp7648048" class="footnote"><sup class="footnote"><a name="idp7648048"></a>[1]</sup></a>.
77
77
It uses <code class="function">posix_memalign()</code> to optimize allocations of many equally-sized
78
78
chunks, and has per-thread free lists (the so-called magazine layer)
79
79
to quickly satisfy allocation requests of already known structure sizes.
96
96
<p>
97
97
</p>
98
98
<div class="example">
99
 
<a name="idp10428592"></a><p class="title"><b>Example 8. Using the slice allocator</b></p>
 
99
<a name="idp11567184"></a><p class="title"><b>Example 8. Using the slice allocator</b></p>
100
100
<div class="example-contents">
101
101
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
102
102
    <tbody>
148
148
<p>
149
149
</p>
150
150
<div class="example">
151
 
<a name="idp12790288"></a><p class="title"><b>Example 9. Using the slice allocator with data structures</b></p>
 
151
<a name="idp7264736"></a><p class="title"><b>Example 9. Using the slice allocator with data structures</b></p>
152
152
<div class="example-contents">
153
153
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
154
154
    <tbody>
539
539
</div>
540
540
<div class="footnotes">
541
541
<br><hr style="width:100; align:left;">
542
 
<div id="ftn.idp11399520" class="footnote"><p><a href="#idp11399520" class="para"><sup class="para">[1] </sup></a>
 
542
<div id="ftn.idp7648048" class="footnote"><p><a href="#idp7648048" class="para"><sup class="para">[1] </sup></a>
543
543
<a class="ulink" href="http://citeseer.ist.psu.edu/bonwick94slab.html" target="_top">[Bonwick94]</a> Jeff Bonwick, The slab allocator: An object-caching kernel
544
544
memory allocator. USENIX 1994, and
545
545
<a class="ulink" href="http://citeseer.ist.psu.edu/bonwick01magazines.html" target="_top">[Bonwick01]</a> Bonwick and Jonathan Adams, Magazines and vmem: Extending the