summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_buf_pool.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-07-07 16:01:34 +0300
committerMax Romanov <max.romanov@nginx.com>2017-07-07 16:01:34 +0300
commitf319220a6c4515f3d31e546b4f1f5de0b94aceb7 (patch)
treeeb4a3ed43d9d7ebef794e51fba56715e65b5a936 /src/nxt_buf_pool.c
parentc9fbd832ab4f5743824b155fb3bf3a42206fdd52 (diff)
downloadunit-f319220a6c4515f3d31e546b4f1f5de0b94aceb7.tar.gz
unit-f319220a6c4515f3d31e546b4f1f5de0b94aceb7.tar.bz2
Redirecting buffer completion handler to specific engine.
There is a case in router where we use port in router connection thread. Buffers are allocated within connection memory pool which can be used only in this router thread. sendmsg() can be postponed into main router thread and completion handler will compare current engine and post itself to correct engine.
Diffstat (limited to 'src/nxt_buf_pool.c')
-rw-r--r--src/nxt_buf_pool.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/nxt_buf_pool.c b/src/nxt_buf_pool.c
index 7ef9def5..8259c60a 100644
--- a/src/nxt_buf_pool.c
+++ b/src/nxt_buf_pool.c
@@ -147,10 +147,6 @@ nxt_buf_pool_free(nxt_buf_pool_t *bp, nxt_buf_t *b)
bp->current = NULL;
}
- if (!bp->mmap) {
- nxt_mp_free(bp->mem_pool, b->mem.start);
- }
-
nxt_buf_free(bp->mem_pool, b);
return;
@@ -176,15 +172,12 @@ nxt_buf_pool_free(nxt_buf_pool_t *bp, nxt_buf_t *b)
void
nxt_buf_pool_destroy(nxt_buf_pool_t *bp)
{
- u_char *p;
nxt_buf_t *b;
bp->destroy = 1;
for (b = bp->free; b != NULL; b = b->next) {
- p = b->mem.start;
nxt_buf_free(bp->mem_pool, b);
- nxt_mp_free(bp->mem_pool, p);
}
bp->free = b; /* NULL */