docs/Writerside/topics/mempool.h.md

branch
docs/3.1
changeset 1142
9437530176bc
parent 1141
a06a2d27c043
child 1143
0559812df10c
equal deleted inserted replaced
1141:a06a2d27c043 1142:9437530176bc
5 the memory is deallocated. 5 the memory is deallocated.
6 Additionally, you may also register _independent_ destructor functions within a pool in case some external library 6 Additionally, you may also register _independent_ destructor functions within a pool in case some external library
7 allocated memory for you, which should be freed together with this pool. 7 allocated memory for you, which should be freed together with this pool.
8 8
9 Many UCX features support the use of an allocator. 9 Many UCX features support the use of an allocator.
10 The [strings](#string), for instance, provide several functions suffixed with `_a` that allow specifying an allocator. 10 The [strings](string.h.md), for instance, provide several functions suffixed with `_a` that allow specifying an allocator.
11 You can use this to keep track of the memory occupied by dynamically allocated strings and cleanup everything with 11 You can use this to keep track of the memory occupied by dynamically allocated strings and cleanup everything with
12 just a single call to `cxMempoolFree()`. 12 just a single call to `cxMempoolFree()`.
13 13
14 The following code illustrates this on the example of reading a CSV file into memory. 14 The following code illustrates this on the example of reading a CSV file into memory.
15 ```C 15 ```C
86 86
87 return 0; 87 return 0;
88 } 88 }
89 ``` 89 ```
90 90
91 ## Undocumented Symbols (TODO)
92 ### cxMempoolCreate
93 ### cxMempoolFree
94 ### cxMempoolRegister
95 ### cxMempoolRemoveDestructor
96 ### cxMempoolSetDestructor

mercurial