1libtalloc_tutorial(3)               talloc               libtalloc_tutorial(3)
2
3
4

NAME

6       libtalloc_tutorial - The Tutorial
7

Introduction

9       Talloc is a hierarchical, reference counted memory pool system with
10       destructors. It is built atop the C standard library and it defines a
11       set of utility functions that altogether simplifies allocation and
12       deallocation of data, especially for complex structures that contain
13       many dynamically allocated elements such as strings and arrays.
14
15       The main goals of this library are: removing the needs for creating a
16       cleanup function for every complex structure, providing a logical
17       organization of allocated memory blocks and reducing the likelihood of
18       creating memory leaks in long-running applications. All of this is
19       achieved by allocating memory in a hierarchical structure of talloc
20       contexts such that deallocating one context recursively frees all of
21       its descendants as well.
22

Main features

24       · An open source project
25
26       · A hierarchical memory model
27
28       · Natural projection of data structures into the memory space
29
30       · Simplifies memory management of large data structures
31
32       · Automatic execution of a destructor before the memory is freed
33
34       · Simulates a dynamic type system
35
36       · Implements a transparent memory pool
37

Table of contents:

39       Chapter 1: Talloc context
40
41       Chapter 2: Stealing a context
42
43       Chapter 3: Dynamic type system
44
45       Chapter 4: Using destructors
46
47       Chapter 5: Memory pools
48
49       Chapter 6: Debugging
50
51       Chapter 7: Best practises
52
53       Chapter 8: Using threads with talloc
54
55
56
57Version 2.0                       12 Apr 2016            libtalloc_tutorial(3)
Impressum