From 7aed26e415a4b58526b1677bf986defade89aa73 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Thu, 16 Jan 2014 15:01:47 -0500 Subject: [PATCH] Rename stuff. --- src/backend/utils/mmgr/mspan.c | 28 +++++++++++++++------------- src/include/utils/mspan.h | 2 +- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/backend/utils/mmgr/mspan.c b/src/backend/utils/mmgr/mspan.c index f3bd1df3fc..d08b4acc5a 100644 --- a/src/backend/utils/mmgr/mspan.c +++ b/src/backend/utils/mmgr/mspan.c @@ -499,33 +499,35 @@ mspan_allocate_context_descriptor(char *base, mspan_manager *mgr) static mspan * mspan_allocate_span_descriptor(char *base, mspan_manager *mgr) { - if (!relptr_is_null(mgr->spansuperblocks)) + mspan *span_of_spans; + + if (!relptr_is_null(mgr->span_of_spans)) { - mspan *spansuperblock = relptr_access(base, mgr->spansuperblocks); char *result; /* Try to allocate from the first span-of-spans. */ - Assert(spansuperblock->span_type == MSPAN_TYPE_SPAN_OF_SPANS); - result = mspan_allocate_from_superblock(base, spansuperblock); + span_of_spans = relptr_access(base, mgr->span_of_spans); + Assert(span_of_spans->span_type == MSPAN_TYPE_SPAN_OF_SPANS); + result = mspan_allocate_from_superblock(base, span_of_spans); if (result != NULL) return (mspan *) result; /* Walk the list looking for a span-of-spans that isn't full. */ for (;;) { - spansuperblock = relptr_access(base, spansuperblock->nextspan); - if (spansuperblock == NULL) + span_of_spans = relptr_access(base, span_of_spans->nextspan); + if (span_of_spans == NULL) break; - Assert(spansuperblock->span_type == MSPAN_TYPE_SPAN_OF_SPANS); - result = mspan_allocate_from_superblock(base, spansuperblock); + Assert(span_of_spans->span_type == MSPAN_TYPE_SPAN_OF_SPANS); + result = mspan_allocate_from_superblock(base, span_of_spans); if (result != NULL) { /* * Move the span from which we allocate to head of list in * the hope of speeding up future searches. */ - mspan_unlink_span(base, spansuperblock); - mspan_link_span_to_manager(base, mgr, spansuperblock); + mspan_unlink_span(base, span_of_spans); + mspan_link_span_to_manager(base, mgr, span_of_spans); /* Return a pointer to the space we allocated. */ return (mspan *) result; @@ -796,7 +798,7 @@ mspan_link_span_to_manager(char *base, mspan_manager *mgr, mspan *span) #endif if (span->span_type == MSPAN_TYPE_SPAN_OF_SPANS) - ptr = &mgr->spansuperblocks.relptr_off; + ptr = &mgr->span_of_spans.relptr_off; else { Size fidx; @@ -944,8 +946,8 @@ mspan_unlink_span(char *base, mspan *span) { mspan_manager *mgr = parent; - if (mgr->spansuperblocks.relptr_off == s.relptr_off) - mgr->spansuperblocks.relptr_off = newhead; + if (mgr->span_of_spans.relptr_off == s.relptr_off) + mgr->span_of_spans.relptr_off = newhead; } default: { diff --git a/src/include/utils/mspan.h b/src/include/utils/mspan.h index 56a3773366..67a8e51911 100644 --- a/src/include/utils/mspan.h +++ b/src/include/utils/mspan.h @@ -78,7 +78,7 @@ struct mspan_manager Size ncontexts; /* # of outstanding contexts */ Size nspans; /* # of outstanding spans */ Size nspansuperblocks; /* # of superblocks for span objects */ - relptr(mspan) spansuperblocks; /* superblock of spans */ + relptr(mspan) span_of_spans; /* superblock for span descriptors */ relptr(mspan_context) freecontext; /* allocatable context object */ aspace_map page_map; /* map pages to mspans */ relptr(mspan) freelist[MSPAN_NUM_FREE_LISTS]; /* spans for freespace */ -- 2.39.5