| От | Tom Lane |
|---|---|
| Тема | Re: Memory management, palloc |
| Дата | |
| Msg-id | 25596.984064452@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Memory management, palloc (Gavin Sherry <swm@linuxworld.com.au>) |
| Список | pgsql-hackers |
Gavin Sherry <swm@linuxworld.com.au> writes:
> I've been looking through the memory management system today.
> When a request is made for a memory memory chunk larger than
> ALLOC_CHUNK_LIMIT, AllocSetAlloc() uses malloc() to give the request its
> own block. The result is tested by AllocSetAlloc() to see if the memory
> was allocated.
> Irrespective of this, a chunk can be returned which has not had memory
> allocated to it. There is no testing of the return status of
> palloc() through out the code.
What's your point?
palloc() does not have the same specification as malloc. It guarantees
to return allocated memory, or elog trying.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера