]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] introduce pipe pools
authorWilly Tarreau <w@1wt.eu>
Sun, 25 Jan 2009 12:49:53 +0000 (13:49 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 25 Jan 2009 12:49:53 +0000 (13:49 +0100)
commit982b6e37e448d5620585a2dba292e6315a0742cb
tree067c425e5f86a27e948d73108a51d93a23416e59
parent1df2470850e4df9b6a61d9c64a4dad46bbe3b212
[MEDIUM] introduce pipe pools

A new data type has been added : pipes. Some pre-allocated empty pipes
are maintained in a pool for users such as splice which use them a lot
for very short times.

Pipes are allocated using get_pipe() and released using put_pipe().
Pipes which are released with pending data are immediately killed.
The struct pipe is small (16 to 20 bytes) and may even be further
reduced by unifying ->data and ->next.

It would be nice to have a dedicated cleanup task which would watch
for the pipes usage and destroy a few of them from time to time.
Makefile
Makefile.bsd
Makefile.osx
include/proto/pipe.h [new file with mode: 0644]
include/types/pipe.h [new file with mode: 0644]
src/pipe.c [new file with mode: 0644]