summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nxt_port_memory.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nxt_port_memory.c b/src/nxt_port_memory.c
index 454827f0..d21d263a 100644
--- a/src/nxt_port_memory.c
+++ b/src/nxt_port_memory.c
@@ -76,6 +76,10 @@ nxt_port_mmaps_destroy(nxt_array_t *port_mmaps, nxt_bool_t destroy_pool)
}
+#define nxt_port_mmap_free_junk(p, size) \
+ memset((p), 0xA5, size)
+
+
static void
nxt_port_mmap_buf_completion(nxt_task_t *task, void *obj, void *data)
{
@@ -119,6 +123,8 @@ nxt_port_mmap_buf_completion(nxt_task_t *task, void *obj, void *data)
c = nxt_port_mmap_chunk_id(hdr, p);
}
+ nxt_port_mmap_free_junk(p, b->mem.end - p);
+
while (p < b->mem.end) {
nxt_port_mmap_set_chunk_free(hdr, c);