[uae] Using more than 32MB of Zorro III memory and JIT direct-memory access on Linux

  • From: Richard Drummond <evilrich@xxxxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Mon, 9 May 2005 22:10:32 -0500

Hi All

Okay. As you may know, if you allocate more than 32 MB of Zorro III mem in 
E-UAE, then the JIT's direct-memory allocation scheme fails (although on your 
system the limit may actually be different) and performance is reduced.

I always thought this was a glibc limitation, but I was wrong. I guess I never 
read the shmget man page very closely (JIT direct memory is allocated and 
mapped using SYSV shared-memory calls).

Anyway, the limit on the size of a shmem segment is set by the kernel and it's 
not a hard limit. It can be modified via the proc filesystem.

If you do

cat /proc/sys/kernel/shmmax

it should tell you the current maximum size of a shm segment in bytes (mine 
was set to 33554432 which is 32 MB).

To change that, you need to be root. Simply echo the new size to 
the /proc/sys/kernel/shmmax file.

For example, to set it to 64 MB, do

echo 67108864 > /proc/sys/kernel/shmmax

Cheers,
Rich

Other related posts:

  • » [uae] Using more than 32MB of Zorro III memory and JIT direct-memory access on Linux