[uae] Re: Crash with mor than 32MB Z3 Ram.

  • From: Richard Drummond <evilrich@xxxxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Thu, 9 Sep 2004 15:21:59 -0500

Hi Karl

On Thursday 09 September 2004 07:25 am, Karl Dietrich Bamler wrote:
> Today i expanded my computers memory with a 512MB DDR-Ram module instead of
> my old 256MB SDR module in order to use UAE with more than 32MB Z3 Ram.
>
> Everything seems to work OK in Linux, all other pplikations are fine - but
> UAE.
>
> UAE crashes when i set the Z3 Memory to more than 32MB of RAM. With less
> than 32MB it works, with more it crashes.

I know about the problem with allocating more than 32MB of Z3 memory. This is 
due to a limit on the size of a shared memory segment in glibc. It shouldn't 
crash, though. It should just fall back on using indirect memory access. I 
can confirm that this happens here now too. I'll see what's happening. This 
didn't used to be a problem.

> I can also keep UAE from crashing by setting "Address Lookup" from "Direct"
> to "Indirect".  With this setting i can use more memory.
>
> I am not shure if this is of no importance or a serious thing. I don't even
> have a clue what "Adress Lookup" is all about. UAE works for me but i am
> curious. :-)

The Direct/Indirect thing determines how the JIT accesses memory.

Normally, UAE uses indirect memory access. The Amiga memory used by UAE is 
allocated with a plain malloc() call and can be anywhere in UAE's address 
space. There's no fixed relation between where the separate chunks of memory 
- Chip mem, Fast mem, etc. - are located im the host address space. To 
determine the host memory accessed by an Amiga address, UAE thus first has to 
determine which chunk of memory this address belongs to and then convert that 
to a host address in that space.

Direct memory access is much faster, since UAE maps allocated Amiga memory 
into a direct representation of the Amiga address space - starting at the 
host address 0x5000000 on Linux. Thus, chip memory is found at 0x5000000, 
Kickstart at 0x50f80000, etc. To convert an Amiga address into a host 
address, all that's needed is to add 0x50000000 to the addresss.

UAE currently uses shmget() and friends to manage direct memory - and as I 
said above, this has a problem in that the largest shm segment is 32MB.

I'm working a new memory allocation scheme for direct memory, but it's not 
ready yet.

Cheers,
Rich
 

Other related posts: