[haiku-development] Re: Writing Device Drivers - CRAM - Problem Malloc()

  • From: Earl Pottinger <earl_colby_pottinger@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 22 Aug 2011 12:40:07 -0700 (PDT)

Writing Device Drivers - CRAM - Problem Malloc()

> > <earl_colby_pottinger> wrote:

> > Does malloc() have a lot of overhead or am I doing something wrong?

> > I started with 1MB allocations, but even on a 3GB machine with
> > no applications I get allocation errors after 1.6GB of allocation.
> > Why?

> Rene Gollent wrote:
> You're most likely exhausting your virtual address space. Bear in
> mind, the address space is split in half where 2GB goes to the kernel
> and 2GB to userland, and as such that's the most you'd be able to
> allocate assuming nothing else was taking up the space.

Thank you, I thought I read somewhere that applications on Haiku could use a 
total of 4GB address space on a machine with enough memory.  From that I just 
assumed (you know what that makes me :)  that I could use more than 2GB on a 
3GB machine.

If in the future I buy a 8GB machine will I still be limited to 2GB per app?

If not, do I have to look for anything special in choosing which machine to 
buy?  Intel vs AMD chipset?  PAE?  Etc.  Can I assume the limit will become 4GB 
per application on such a  machine?

> Ingo Weinhold wrote:
> Assu

Other related posts: