Alfred Perlstein ([EMAIL PROTECTED]) wrote:
> * Joseph Gleason <[EMAIL PROTECTED]> [010311 20:48] wrote:
> > 
> > ----- Original Message -----
> > From: "Alfred Perlstein" <[EMAIL PROTECTED]>
> > To: "Ian Campbell" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Sunday, March 11, 2001 23:41
> > Subject: Re: Greater than 2GB per process
> > 
> > 
> > > * Ian Campbell <[EMAIL PROTECTED]> [010311 16:14] wrote:
> > > >
> > > > Hello,
> > > > Could anybody advise me on the possiblity of having greater than
> > > > 2GB per process on FreeBSD. I have tried increasing the limit beyond
> > this
> > > > and the kernel compiles successfully - however libc causes every process
> > > > to segfault. I am assuming that just recompiling the C library wouldn't
> > do
> > > > the trick but perhaps someone could confirm this.
> > >
> > > It's not possible on the Intel archetecture with the current system,
> > > changing the current intel system to use > 2GB processes would cost too
> > > much in terms of performance (64 bit values on a 32 bit system).
> > >
> > > At least that's what i've been told.
> > >
> > 
> > I know very little about how kernel or low level processor stuff works, but
> > shouldn't we be able to do a 4GB process on a 32-bit system?
> > The limitation of 2GB per process should only be an issue if there is some
> > need to use signed numbers, right?
> 
> Yes, we use signed numbers.  Check the list archives, there's some
> pretty detailed discussions that explain why it's this way.

Actually.. the kernel and userspace processes use the same address space
and since the kernel take 1GB of the address apce, you then have 512MB
allocated for the malloc pool and the rest is allocated to malloc, so
techinically you can mmap 2.5GB of memory, but according to the manual
page of mmap..

BUGS
     len is limited to 2GB.  Mmapping slightly more than 2GB doesn't work, but
     it is possible to map a window of size (filesize % 2GB) for file sizes of
     slightly less than 2G, 4GB, 6GB and 8GB.

     The limit is imposed for a variety of reasons.  Most of them have to do
     with FreeBSD not wanting to use 64 bit offsets in the VM system due to
     the extreme performance penalty.  So FreeBSD uses 32bit page indexes and
     this gives FreeBSD a maximum of 8TB filesizes.  It's actually bugs in the
     filesystem code that causes the limit to be further restricted to 1TB
     (loss of precision when doing blockno calculations).

     Another reason for the 2GB limit is that filesystem metadata can reside
     at negative offsets.

asd     We currently can only deal with page aligned file offsets.
b

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to