Changeset 257

Show
Ignore:
Timestamp:
07/30/06 13:09:59 (2 years ago)
Author:
bart
Message:

Fixed detection of SysV IPC shared memory and made anonymous mmap

the first selected type. This makes the behaviour of rc1 the
default. anonymous mmap doens't have the problem of shmmax. SysVIPC is
still available!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/branches/0.9.5/ChangeLog

    r250 r257  
     12006-07-30  Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 
     2 
     3        * Fixed detection of SysV IPC shared memory and made anonymous mmap  
     4          the first selected type. This makes the behaviour of rc1 the  
     5          default. anonymous mmap doens't have the problem of shmmax. SysVIPC is  
     6          still available! 
     7 
    182006-07-27  Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 
    29 
  • eaccelerator/branches/0.9.5/config.m4

    r207 r257  
    230230 
    231231  AC_MSG_CHECKING(for best shared memory type) 
    232   if test "$mm_shm_ipc" = "yes"; then 
     232  if test "$mm_shm_mmap_anon" = "yes"; then 
     233    AC_DEFINE(MM_SHM_MMAP_ANON, 1, [Define if you like to use anonymous mmap based shared memory]) 
     234    msg="anonymous mmap" 
     235  elif test "$mm_shm_ipc" = "yes"; then 
    233236    AC_DEFINE(MM_SHM_IPC, 1, [Define if you like to use sysvipc based shared memory]) 
    234237    msg="sysvipc" 
    235   elif test "$mm_shm_mmap_anon" = "yes"; then 
    236     AC_DEFINE(MM_SHM_MMAP_ANON, 1, [Define if you like to use anonymous mmap based shared memory]) 
    237     msg="anonymous mmap" 
    238238  elif test "$mm_shm_mmap_zero" = "yes"; then 
    239239    AC_DEFINE(MM_SHM_MMAP_ZERO, 1, [Define if you like to use mmap on /dev/zero based shared memory]) 
  • eaccelerator/branches/0.9.5/mm.c

    r230 r257  
    707707    while ((fd = shmget(IPC_PRIVATE, seg_size, (IPC_CREAT | SHM_R | SHM_W))) == -1) { 
    708708      if (seg_size <= 1024*1024) { 
     709#if !defined(MM_TEST_SEM) && !defined(MM_TEST_SHM) 
    709710        ea_debug_error("eAccelerator: shmmax should be at least 2MB"); 
     711#endif 
    710712        return (MM*)-1; 
    711713      } 
    712714      seg_size /= 2; 
    713715    } 
     716#if !defined(MM_TEST_SEM) && !defined(MM_TEST_SHM) 
    714717    ea_debug_error("eAccelerator: Could not allocate %d bytes, the maximum size the kernel allows is %d bytes. " 
    715718            "Lower the amount of memory request or increase the limit in /proc/sys/kernel/shmmax.\n", size, seg_size); 
     719#endif 
    716720 
    717721    /* bart: Removed the code that tried to allocate more then one segment