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

NAME

6       libtalloc_tutorial - The Tutorial
7
8

Introduction

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

Main features

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

Table of contents:

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