nxt_mp.c (1563:d32bc428f46b) nxt_mp.c (2078:0996dd223cdd)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

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

934 nxt_mp_free_junk(p, size);
935
936 /* Test if all pages in the cluster are free. */
937
938 n = mp->cluster_size >> mp->page_size_shift;
939 page = cluster->pages;
940
941 do {
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

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

934 nxt_mp_free_junk(p, size);
935
936 /* Test if all pages in the cluster are free. */
937
938 n = mp->cluster_size >> mp->page_size_shift;
939 page = cluster->pages;
940
941 do {
942 if (page->size != 0) {
943 return NULL;
944 }
942 if (page->size != 0) {
943 return NULL;
944 }
945
945
946 page++;
947 n--;
946 page++;
947 n--;
948 } while (n != 0);
949
950 /* Free cluster. */
951
952 n = mp->cluster_size >> mp->page_size_shift;
953 page = cluster->pages;
954
955 do {
948 } while (n != 0);
949
950 /* Free cluster. */
951
952 n = mp->cluster_size >> mp->page_size_shift;
953 page = cluster->pages;
954
955 do {
956 nxt_queue_remove(&page->link);
957 page++;
958 n--;
956 nxt_queue_remove(&page->link);
957 page++;
958 n--;
959 } while (n != 0);
960
961 nxt_rbtree_delete(&mp->blocks, &cluster->node);
962
963 p = cluster->start;
964
965 nxt_free(cluster);
966 nxt_free(p);

--- 109 unchanged lines hidden ---
959 } while (n != 0);
960
961 nxt_rbtree_delete(&mp->blocks, &cluster->node);
962
963 p = cluster->start;
964
965 nxt_free(cluster);
966 nxt_free(p);

--- 109 unchanged lines hidden ---