nxt_buf.c (65:10688b89aa16) nxt_buf.c (98:4077decf847b)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

--- 4 unchanged lines hidden (view full) ---

13void
14nxt_buf_mem_init(nxt_buf_t *b, void *start, size_t size)
15{
16 b->size = NXT_BUF_MEM_SIZE;
17
18 b->mem.start = start;
19 b->mem.pos = start;
20 b->mem.free = start;
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

--- 4 unchanged lines hidden (view full) ---

13void
14nxt_buf_mem_init(nxt_buf_t *b, void *start, size_t size)
15{
16 b->size = NXT_BUF_MEM_SIZE;
17
18 b->mem.start = start;
19 b->mem.pos = start;
20 b->mem.free = start;
21 b->mem.end = (u_char *) start + size;
21 b->mem.end = nxt_pointer_to(start, size);
22}
23
24
25nxt_buf_t *
26nxt_buf_mem_alloc(nxt_mp_t *mp, size_t size, nxt_uint_t flags)
27{
28 nxt_buf_t *b;
29

--- 154 unchanged lines hidden ---
22}
23
24
25nxt_buf_t *
26nxt_buf_mem_alloc(nxt_mp_t *mp, size_t size, nxt_uint_t flags)
27{
28 nxt_buf_t *b;
29

--- 154 unchanged lines hidden ---