Miroslav Zagorac | 70230c6 | 2020-12-09 16:54:31 +0100 | [diff] [blame] | 1 | Used pools: |
| 2 | |
| 3 | -------------------------------+-----------------------------+----------------------------- |
| 4 | head / name | size | define |
| 5 | -------------------------------+-----------------------------+----------------------------- |
| 6 | pool_head_ buffer | global.tune.bufsize = 16384 | USE_POOL_BUFFER |
| 7 | pool_head_ trash | 32 + 16384 | USE_TRASH_CHUNK |
| 8 | -------------------------------+-----------------------------+----------------------------- |
| 9 | pool_head_ ot_scope_span | 96 | USE_POOL_OT_SCOPE_SPAN |
| 10 | pool_head_ ot_scope_context | 64 | USE_POOL_OT_SCOPE_CONTEXT |
| 11 | pool_head_ ot_runtime_context | 128 | USE_POOL_OT_RUNTIME_CONTEXT |
| 12 | pool_head_ ot_span_context | 96 | USE_POOL_OT_SPAN_CONTEXT |
| 13 | -------------------------------+-----------------------------+----------------------------- |
| 14 | |
| 15 | By defining individual definitions in file include/config.h, it is possible to |
| 16 | switch individual pools on / off. If a particular pool is not used, memory is |
| 17 | used in a 'normal' way instead, using malloc()/free() functions. |
| 18 | |
Ilya Shipitsin | f38a018 | 2020-12-21 01:16:17 +0500 | [diff] [blame] | 19 | This is made only from the aspect of debugging the program, i.e. comparing the |
Miroslav Zagorac | 70230c6 | 2020-12-09 16:54:31 +0100 | [diff] [blame] | 20 | speed of operation using different methods of working with memory. |
| 21 | |
| 22 | In general, it would be better to use memory pools, due to less fragmentation |
| 23 | of memory space after long operation of the program. The speed of operation |
| 24 | is similar to when using standard allocation functions (when testing it was |
| 25 | shown that pool use was fast by about 1%). |