netlib.narod.ru | < Назад | Оглавление | Далее > |
11734 #ifndef _ASMI386_SHMPARAM_H 11735 #define _ASMI386_SHMPARAM_H 11736 11737 /* address range for shared memory attaches if no address 11738 * passed to shmat() */ 11739 #define SHM_RANGE_START 0x50000000 11740 #define SHM_RANGE_END 0x60000000 11741 11742 /* Format of a swap-entry for shared memory pages 11743 * currently out in swap space (see also mm/swap.c). 11744 * 11745 * SWP_TYPE = SHM_SWP_TYPE 11746 * SWP_OFFSET is used as follows: 11747 * bits 0..6 : id of shared memory segment page belongs 11748 * to (SHM_ID) 11749 * bits 7..21: index of page within shared memory 11750 * segment (SHM_IDX) (actually fewer bits get used since 11751 * SHMMAX is so low) */ 11752 11753 /* Keep _SHM_ID_BITS as low as possible since SHMMNI 11754 * depends on it and there is a static array of size 11755 * SHMMNI. */ 11756 #define _SHM_ID_BITS 7 11757 #define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1) 11758 11759 #define SHM_IDX_SHIFT (_SHM_ID_BITS) 11760 #define _SHM_IDX_BITS 15 11761 #define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1) 11762 11763 /* _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 11764 * and SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS). */ 11765 11766 #define SHMMAX 0x2000000 /* max shared seg size (bytes)*/ 11767 /* Try not to change the default shipped SHMMAX - people 11768 * rely on it */ 11769 11770 /* min shared seg size (bytes) */ 11771 #define SHMMIN 1 /* really PAGE_SIZE */ 11772 /* max num of segs system wide */ 11773 #define SHMMNI (1<<_SHM_ID_BITS) 11774 /* max shm system wide (pages) */ 11775 #define SHMALL (1<<(_SHM_IDX_BITS+_SHM_ID_BITS)) 11776 /* attach addr a multiple of this */ 11777 #define SHMLBA PAGE_SIZE 11778 /* max shared segs per process */ 11779 #define SHMSEG SHMMNI 11780 11781 #endif /* _ASMI386_SHMPARAM_H */
netlib.narod.ru | < Назад | Оглавление | Далее > |