summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_buf.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-01-27 11:35:11 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-01-27 11:35:11 +0300
commitba0391577b06446307fa073f856f57748557e0dd (patch)
treeb2b871a041edee242662c95197bed292531c3a9a /src/nxt_buf.c
parent6886b83c1f3bfdc514d58ad6e9ab40873cafcb54 (diff)
downloadunit-ba0391577b06446307fa073f856f57748557e0dd.tar.gz
unit-ba0391577b06446307fa073f856f57748557e0dd.tar.bz2
Work queues refactoring.
Diffstat (limited to 'src/nxt_buf.c')
-rw-r--r--src/nxt_buf.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nxt_buf.c b/src/nxt_buf.c
index 88444a3d..d2b6fe7a 100644
--- a/src/nxt_buf.c
+++ b/src/nxt_buf.c
@@ -10,6 +10,18 @@
static void nxt_buf_completion(nxt_task_t *task, void *obj, void *data);
+void
+nxt_buf_mem_init(nxt_buf_t *b, void *start, size_t size)
+{
+ b->size = NXT_BUF_MEM_SIZE;
+
+ b->mem.start = start;
+ b->mem.pos = start;
+ b->mem.free = start;
+ b->mem.end = start + size;
+}
+
+
nxt_buf_t *
nxt_buf_mem_alloc(nxt_mem_pool_t *mp, size_t size, nxt_uint_t flags)
{