mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-02-26 11:41:50 +01:00
This function allocates a buffer and replaces *buf with this buffer. If no memory is available, &buf_wanted is used instead. No control is made to check if *buf already pointed to another buffer. The allocated buffer is returned, or NULL in case no memory is available. The difference with b_alloc() is that this function only picks from the pool and never calls malloc(), so it can fail even if some memory is available. It is the caller's job to refill the buffer pool if needed.