]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: chunk: Add support for small chunks
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 19 Mar 2026 14:21:26 +0000 (15:21 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 23 Mar 2026 13:02:42 +0000 (14:02 +0100)
commit92a24a4e875b5fbd4678001d184bd5a35d7e5a3d
tree4335a77741503e1ea1b5918f165aa2d4c9020b56
parent467f911cea2055ba025cc5825d753fdf6bbc9695
MEDIUM: chunk: Add support for small chunks

In the same way support for large chunks was added to properly work with
large buffers, we are now adding supports for small chunks because it is
possible to process small buffers.

So a dedicated memory pool is added to allocate small
chunks. alloc_small_trash_chunk() must be used to allocate a small
chunk. alloc_trash_chunk_sz() and free_trash_chunk() were uppdated to
support small chunks.

In addition, small trash buffers are also created, using the same mechanism
than for regular trash buffers. So three thread-local trash buffers are
created. get_small_trash_chunk() must be used to get a small trash buffer.
And get_trash_chunk_sz() was updated to also deal with small buffers.
include/haproxy/chunk.h
src/chunk.c