]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: chunk: Add support for large chunks
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 3 Feb 2026 10:55:10 +0000 (11:55 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 Feb 2026 12:26:21 +0000 (13:26 +0100)
commitce912271db4e1a793a71484892b7df2c4b7c2b9c
tree7642483ced5c8fc75b558587072cc6fd345273d8
parentd89ec33a34d42a6a1726d08c39460abcb2e64549
MEDIUM: chunk: Add support for large chunks

Because there is now a memory pool for large buffers, we must also add the
support for large chunks. So, if large buffers are configured, a dedicated
memory pool is created to allocate large chunks. alloc_large_trash_chunk()
must be used to allocate a large chunk. alloc_trash_chunk_sz() can be used to
allocate a chunk with the best size. However free_trash_chunk() remains the
only way to release a chunk, regular or large.

In addition, large trash buffers are also created, using the same mechanism
than for regular trash buffers. So three thread-local trash buffers are
created. get_large_trash_chunk() must be used to get a large trash buffer.
And get_trash_chunk_sz() may be used to get a trash buffer with the best
size.
doc/configuration.txt
include/haproxy/chunk.h
src/chunk.c