From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 25 Mar 2004 11:44:52 +0300 From: Grigory Batalov To: ALT Devel discussion list Subject: Re: [devel] Fw: Re: [sisyphus] Shared memory Message-Id: <20040325114452.2c391fa2.bga@altlinux.ru> In-Reply-To: <20040325111059.0162db1e.bga@altlinux.ru> References: <20040325111059.0162db1e.bga@altlinux.ru> Organization: OAO "Kovdorsky GOK" X-Mailer: Sylpheed version 0.9.6 (GTK+ 1.2.10; i586-alt-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.4 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2004 08:44:47 -0000 Archived-At: List-Archive: List-Post: Begin forwarded message: Date: Thu, 25 Mar 2004 03:24:31 -0500 From: Ivan Adzhubey To: ALT Linux Sisyphus discussion list Subject: Re: [sisyphus] Shared memory - HELP PLEASE! On Thursday 25 March 2004 02:44 am, Grigory Batalov wrote: > On Thu, 25 Mar 2004 02:17:54 -0500 > > man shmget: > > ...A new shared memory segment, with > size equal to the value of size rounded up to a multiple of PAGE_SIZE, > is created... То есть должно быть: size = [1..1024] shmblock = 1024 (или 1 * PAGE_SIZE) size = [1025..2047] shmblock = 2048 (или 2 * PAGE_SIZE) size = [2048..3071] shmblock = 3072 (или 3 * PAGE_SIZE) и тд. Вместо этого получаем: size = [1..1024] shmblock = 0 size = [1025..2047] shmblock = 4096 size = [2048..4095] shmblock = 8192 size = [4096..5119] shmblock = 16384 и тд. Какое же это rounded up to a multiple of PAGE_SIZE, даже если например PAGE_SIZE == 4096? -- Иван