haproxy/include/common
Willy Tarreau b686afd568 MINOR: chunks: implement a simple dynamic allocator for trash buffers
The trash buffers are becoming increasingly complex to deal with due to
the code's modularity allowing some functions to be chained and causing
the same chunk buffers to be used multiple times along the chain, possibly
corrupting each other. In fact the trash were designed from scratch for
explicitly not surviving a function call but string manipulation makes
this impossible most of the time while not fullfilling the need for
reliable temporary chunks.

Here we introduce the ability to allocate a temporary trash chunk which
is reserved, so that it will not conflict with the trash chunks other
functions use, and will even support reentrant calls (eg: build_logline).

For this, we create a new pool which is exactly the size of a usual chunk
buffer plus the size of the chunk struct so that these chunks when allocated
are exactly the same size as the ones returned by get_trash_buffer(). These
chunks may fail so the caller must check them, and the caller is also
responsible for freeing them.

The code focuses on minimal changes and ease of reliable backporting
because it will be needed in stable versions in order to support next
patch.
2017-02-08 11:16:29 +01:00
..
accept4.h
base64.h
buffer.h BUG/MAJOR: Fix how the list of entities waiting for a buffer is handled 2016-12-12 19:11:04 +01:00
cfgparse.h MINOR: cfgparse: add two new functions to check arguments count 2016-12-21 23:39:26 +01:00
chunk.h MINOR: chunks: implement a simple dynamic allocator for trash buffers 2017-02-08 11:16:29 +01:00
compat.h BUILD: tcp: define SOL_TCP when only IPPROTO_TCP exists 2016-08-10 21:11:38 +02:00
compiler.h
config.h BUILD: fix dependencies between config and compat.h 2014-07-15 19:09:36 +02:00
debug.h MINOR: debug: enable memory poisonning to use byte 0 2015-10-08 14:12:13 +02:00
defaults.h MAJOR: ssl: bind configuration per certificat 2017-01-13 11:40:34 +01:00
epoll.h
errors.h
hash.h MINOR: hash: add new function hash_crc32 2015-01-20 19:48:05 +01:00
memory.h MEDIUM: pools: add a new flag to avoid rounding pool size up 2016-01-25 02:31:18 +01:00
mini-clist.h BUILD: freebsd: double declaration 2015-11-06 01:15:02 +01:00
namespace.h CLEANUP: namespaces: fix protection against multiple inclusions 2015-04-08 17:31:40 +02:00
rbtree.h
regex.h MEDIUM: regex: pcre2 support 2016-12-28 12:51:51 +01:00
splice.h
standard.h MINOR: tools: make str2sa_range() return the port in a separate argument 2017-01-06 19:29:34 +01:00
syscall.h BUILD: enable build on Linux/s390x 2015-10-12 20:58:51 +02:00
template.h
ticks.h
time.h
tools.h
uri_auth.h MINOR: stats: add ST_SHOWADMIN to pass the admin info in the regular flags 2016-03-11 17:08:05 +01:00
version.h DOC: stop referencing the slow git repository in the README 2014-05-10 11:04:39 +02:00