>>>>> On Tue, 14 Aug 2001 10:49:41 +0200, Ralf Baechle <email@example.com> said:
ralf> It's wasting huge amounts of address space. That can be
ralf> prohibitive if you want to run something such as electric fence.
ralf> Technically the worst case of any CPU that's required is 32kb on
ralf> R4000 / R4400 SC and MC versions, so I don't want to go beyond
Yes. My patch is wasting address space. I did not know reasonable
size for alignment, so I used SHMLBA value. It may be better to
calculate proper alignment size on run-time or compile-time.
ralf> What does this patch have to do with SysV shared mem? Shmat(2)
ralf> does proper alignment checking and aligning and doesn't call
I tried with this code (Xshm extention in Xserver use shm like this) :
shmid = shmget(IPC_PRIVATE, 0x1000, IPC_CREAT | 0777);
data = shmat(shmid, 0, 0);
data2 = shmat(shmid, 0, 0);
In this case, get_unmapped_area() is called with a file structure does
not have 'get_unmapped_area' operation ('shmem_file_operations') so
arch_get_unmapped_area() is called.