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/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