Beena Emerson <memissemer...@gmail.com> writes: > In the pg_trgm module, within function generate_trgm, the memory for trigrams > is allocated as follows:
> trg = (TRGM *) palloc(TRGMHDRSIZE + sizeof(trgm) * (slen / 2 + 1) *3); > I have been trying to understand why this is so because it seems to be > allocating more space than that is required. Consider input like 'X X X X X'. Each X produces 3 trigrams. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers