[PATCH] Make gram.y use palloc/pfree for memory management

Поиск
Список
Период
Сортировка
От Marko Kreen
Тема [PATCH] Make gram.y use palloc/pfree for memory management
Дата
Msg-id 20080831221727.18573.11996.stgit@lapp
обсуждение исходный текст
Ответы Re: [PATCH] Make gram.y use palloc/pfree for memory management
Список pgsql-hackers
Currently gram.y uses malloc/free for memory management,
but all pointers are local to function.  Unlike flex-based
scan.l which has static references to buffers and reuses them
across calls.

This means gram.y can leak memory if error is throws in
the middle of parsing.

The patch redefines malloc/free to palloc/pfree to fix the leak.

I did not use YYSTACK_ALLOC / YYSTACK_FREE that exists in newer bison,
because bison 1.875 does not support those.
Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: WIP patch: Collation support
Следующее
От: Marko Kreen
Дата:
Сообщение: [PATCH] Cleanup of GUC units code