Re: Proposal for fixing intra-query memory leaks
От | Tom Lane |
---|---|
Тема | Re: Proposal for fixing intra-query memory leaks |
Дата | |
Msg-id | 5180.957304863@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Proposal for fixing intra-query memory leaks (Karel Zak <zakkr@zf.jcu.cz>) |
Список | pgsql-hackers |
Karel Zak <zakkr@zf.jcu.cz> writes: > IMHO in standard chunk header not must be chunk size. If something needs > chunk size it cat use depend-header. We might as well put the size in the standard header, though, because (a) all context management methods are going to need it (how you gonna do repalloc otherwise?) and (b) there are alignment considerations. The size of the headers has to be a multiple of MAXALIGN which is 8 on quite a few architectures. If you just make each of the standard-header and depend-header a multiple of MAXALIGN then you end up wasting 8 bytes per alloc chunk on these machines. You could get around that with some notational ugliness (ie, standard header is not declared as part of depend-header but you compute the pointer to it separately). But I don't see the value of working that hard to keep the size out of the standard header. Also, since aset.c is going to be our standard memory allocator for the foreseeable future, there's no good reason to make its life more difficult by having to work with both a standard-header and a depend-header. If it can get along with only a standard-header, why not let it do so? regards, tom lane
В списке pgsql-hackers по дате отправления: