Re: 1GB process size limit on sparc64

William Schaub <[email protected]>
Newsgroups gmane.os.openbsd.sparc
Message-ID <[email protected]>
Paul de Weerd wrote:
> On Thu, Jun 03, 2010 at 10:26:57AM -0400, William Schaub wrote:
> | I may not want every process on the system sucking up 1GB or more
> | but I sure want to be able to work with more memory in a single
> | process if I need to. (what if you want to mmap a file larger than
> | 1GB?)
> 
> Well .. then you mmap a file larger than 1GB. What of it ? Have you
> tried mmap(2)'ing a file larger than 1GB ? I'm guessing you haven't...
> 
> For fun (no profit) I just mmap'ed a file that is larger than 8GB on
> my amd64 workstation (MAXDSIZ is 8G on amd64, ulimit was the default
> for staff, 524288K). I could read each and every byte from this file
> (takes ~3.5 minutes and really thrashes my lowly SATA disk).
> 
> So, yeah, you can mmap files bigger than MAXDSIZ just fine.
> 
> Cheers,

Ok granted I assumed you couldn't mmap that much only because of the 
error I was getting with trying to mount an mfs filesystem based on the 
size of one of my swap partitions. which gives back.

mount_mfs: mmap: Cannot allocate memory


Either way I do know 100% for sure that you can never malloc more than 
the small amount in MAXDSIZ. and I was just interested in know if there 
are any plans to fix that for the sparc64 port. I'm pretty sure on amd64 
you the limit is a bit higher. in fact on amd64 the define is:
#define MAXDSIZ         ((paddr_t)8*1024*1024*1024)

I will go ahead and try doing mmap anyway and see what happens.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.