[devel] Fw: Re: [sisyphus] Shared memory

Grigory Batalov =?iso-8859-1?q?bga_=CE=C1_altlinux=2Eru?=
Чт Мар 25 11:44:52 MSK 2004


Begin forwarded message:

Date: Thu, 25 Mar 2004 03:24:31 -0500
From: Ivan Adzhubey <iadzhubey на rics.bwh.harvard.edu>
To: ALT Linux Sisyphus discussion list <sisyphus на altlinux.ru>
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?

-- 
Иван



Подробная информация о списке рассылки Devel