Re: Missing checks when malloc returns NULL... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Missing checks when malloc returns NULL...
Date
Msg-id 20942.1472735024@sss.pgh.pa.us
Whole thread Raw
In response to Re: Missing checks when malloc returns NULL...  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Missing checks when malloc returns NULL...  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> Also, we could take one extra step forward then, and just introduce
> ShmemAllocExtended that holds two flags as per the attached:
> - SHMEM_ALLOC_ZERO that zeros all the fields
> - SHMEM_ALLOC_NO_OOM that does not fail

Don't see the point really ... it's just more API churn without any
very compelling reason.

(It doesn't look like you correctly implemented the case of both
flags being set, either.)
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Borodin
Date:
Subject: Re: GiST penalty functions [PoC]
Next
From: Fujii Masao
Date:
Subject: Re: GIN logging GIN_SEGMENT_UNMODIFIED actions?