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
systemlibraries that get linked), plus a good chunk for the main thread stack, plus library data structures. End result
isyou likely have about 2GB (or less) address space available for heap allocations. And this of course will get used
andat 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
acontiguous 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
whereit comes from (network or disk), really has nothing to do with postgres, and the actual size at which you'll start
tohave problems with vary a good bit depending on: OS, libraries you link to, memory management library you use, memory
managementtechniques you use, and to a very great extent your specific app and exactly what it does.
--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice