Enabled body buffer shared memory segmentation.

Changeset #699 fixes shared memory allocation: continous buffer with
requested size should be allocated or function failed.  For body longer
than 10 Mb, this allocation will definitely fails.

For body buffer it is not required to send it in a single continous buffer,
so, need to request minimum reasonable amount of shared memory and try to
extend it, if possible or allocate next buffer.
This commit is contained in:
Max Romanov
2018-07-12 16:06:36 +03:00
parent e6cd1c4257
commit 4d818a6f23
3 changed files with 34 additions and 35 deletions

View File

@@ -89,7 +89,7 @@ struct nxt_port_mmap_tracking_msg_s {
nxt_chunk_id_t tracking_id; /* Tracking index. */
};
static nxt_bool_t
nxt_inline nxt_bool_t
nxt_port_mmap_get_free_chunk(nxt_free_map_t *m, nxt_chunk_id_t *c);
#define nxt_port_mmap_get_chunk_busy(m, c) \
@@ -126,7 +126,7 @@ nxt_port_mmap_chunk_start(nxt_port_mmap_header_t *hdr, nxt_chunk_id_t c)
}
static nxt_bool_t
nxt_inline nxt_bool_t
nxt_port_mmap_get_free_chunk(nxt_free_map_t *m, nxt_chunk_id_t *c)
{
const nxt_free_map_t default_mask = (nxt_free_map_t) -1;