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;
#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;
{
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:
{
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 */