summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_buf.c
diff options
context:
space:
mode:
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)
{