|From:||Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>|
|To:||Simon Riggs <simon(at)2ndquadrant(dot)com>|
|Subject:||Re: PATCH : Generational memory allocator (was PATCH: two slab-like memory allocators)|
|Views:||Raw Message | Whole Thread | Download mbox|
Attached is an updated version of the patch, tweaking the comments.
1) I've added a section at the end of src/backend/utils/mmgr/README,
briefly explaining the alternative memory allocators we have. I don't
think we should get into too much low-level detail here, that's more
appropriate for the .c file for each context.
2) I've slightly reworded a paragraph in generation.c describing what
use cases are suitable for the memory context. It used to say:
This memory context is based on the assumption that the allocated
chunks have similar lifespan, i.e. that chunks allocated close from
each other (by time) will also be freed in close proximity, and
mostly in the same order. This is typical for various queue-like use
cases, i.e. when tuples are constructed, processed and then thrown
and now it says:
This memory context is based on the assumption that the chunks are
freed roughly in the same order as they were allocated (FIFO), or in
groups with similar lifespan (generations - hence the name of the
context). This is typical for various queue-like use cases, i.e. when
tuples are constructed, processed and then thrown away.
3) I've also added a brief note into reorderbuffer.c mentioning that it
uses SlabContext and GenerationContext. As I explained, I don't think we
should include details about how we tested the patch or whatever here.
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
|Next Message||Erik Rijkers||2017-09-24 20:36:59||comments improvements|
|Previous Message||Andrew Dunstan||2017-09-24 20:19:37||Re: [BUGS] BUG #14825: enum type: unsafe use?|