Re: Memory management, palloc - Mailing list pgsql-hackers

From Karel Zak
Subject Re: Memory management, palloc
Date
Msg-id 20010308155429.A11790@ara.zf.jcu.cz
Whole thread Raw
In response to Memory management, palloc  (Gavin Sherry <swm@linuxworld.com.au>)
Responses Re: Memory management, palloc
List pgsql-hackers
On Thu, Mar 08, 2001 at 10:28:50PM +1100, Gavin Sherry wrote:
> Hi guys,
> 
> 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. 
I don't understand. If some memory is not obtain in AllocSetAlloc()
all finish with elog(ERROR). Not exists way how return insufficient 
space. Or not?
    Karel

-- Karel Zak  <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz,
http://mape.jcu.cz


pgsql-hackers by date:

Previous
From: "Vadim Mikheev"
Date:
Subject: Re: WAL does not recover gracefully from out-of-disk-space
Next
From: Tom Lane
Date:
Subject: Depending on system install scripts (was Re: [BUGS] COBOL)