On Sep 20, 2010, at 8:06 AM, Willy-Bas Loos wrote:

> Sheesh..
> 
> - why?

Because you start with 4GB of address space, immediately give up maybe 0.5GB 
for mapping executable code (all the system libraries that get linked), plus a 
good chunk for the main thread stack, plus library data structures. End result 
is you likely have about 2GB (or less) address space available for heap 
allocations. And this of course will get used and at least somewhat fragmented 
as your program runs. So it is difficult to find a 1GB contiguous block for 
allocation.

> - how about 64 bit?

Well, you start with 17,179,869,184GB of address space, so of course it's 
different. It tends to be pretty easy to find a contiguous 1GB block in an 
address space that size.

> - should this be documented?

Doubtful. It has to do with very well known limits of 32-bit programs, applies 
to any use for a 1GB block regardless of where it comes from (network or disk), 
really has nothing to do with postgres, and the actual size at which you'll 
start to have problems with vary a good bit depending on: OS, libraries you 
link to, memory management library you use, memory management techniques you 
use, and to a very great extent your specific app and exactly what it does.

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to