Oversight in slab.c SlabContextCreate(), initial memory allocation size is not populated to context->mem_allocated

Поиск
Список
Период
Сортировка
От Reid Thompson
Тема Oversight in slab.c SlabContextCreate(), initial memory allocation size is not populated to context->mem_allocated
Дата
Msg-id 491ebf6e1cd05adc3428db60eaac9487b6604037.camel@crunchydata.com
обсуждение исходный текст
Ответы Re: Oversight in slab.c SlabContextCreate(), initial memory allocation size is not populated to context->mem_allocated  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
Hi,

Both aset.c and generation.c populate mem_allocated in
AllocSetContextCreateInternal(), GenerationContextCreate()
respectively.
aset.c
    /* Finally, do the type-independent part of context creation */
    MemoryContextCreate((MemoryContext) set,
                        T_AllocSetContext,
                        &AllocSetMethods,
                        parent,
                        name);

            
    ((MemoryContext) set)->mem_allocated = firstBlockSize;

            
    return (MemoryContext) set;
}

            
generation.c
    /* Finally, do the type-independent part of context creation */
    MemoryContextCreate((MemoryContext) set,
                        T_GenerationContext,
                        &GenerationMethods,
                        parent,
                        name);

            
    ((MemoryContext) set)->mem_allocated = firstBlockSize;

            
    return (MemoryContext) set;
}

slab.c
does not in SlabContextCreate(). Is this intentional, it seems to be an
oversight to me.

    /* Finally, do the type-independent part of context creation */
    MemoryContextCreate((MemoryContext) slab,
                        T_SlabContext,
                        &SlabMethods,
                        parent,
                        name);

            
    return (MemoryContext) slab;
}
--
Reid Thompson
Senior Software Engineer
Crunchy Data, Inc.

reid.thompson@crunchydata.com
www.crunchydata.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: chap@anastigmatix.net
Дата:
Сообщение: Re: Documentation about PL transforms
Следующее
От: Tom Lane
Дата:
Сообщение: Re: generic plans and "initial" pruning