Pagesize is different between IA32 and IA64
I am sorry I forgot to say my opinion and attach sample program.
I think the solution of this problem is which following them
- __getpagesize function should returns the real pagesize
- It needs to prepare the another function that returns real pagesize for malloc instead.
I have confirmed this problem, the Kernel version is 2.4.7 and the libc version is 2.2.4.
This is a sample program.
Quoted 29 lines
Hello all.
If this problem has already known, I am sorry.
I am investigating the problem that calloc returns no cleared area.
It was made on IA32 system and executes on IA64. I think calloc expects to clear the memories sbrk returned. But When the program made on IA32 is executing on IA64 system, sbrk sometimes returns no cleared area.
Because the Kernel on IA64 alignes the memories 16K bytes. However, when the progmam made on IA32 is executing on IA64, the function__getpagesizereturns 4Kbytes. At this case, if the memories that calloc requests to return sbrk(-xxx) is smaller than 16Kbytes, the kernel do not unmap this memory.
(I think that the time that the memories clears 0 by the kernel is when the kernel maps memories by the signal)How do you think?
--
Regards,
Hideki Yamamoto (V).v.(V) # Empowered by Innovation
As a supplement to his report,
it seems that sys_brk() in mm/mmap.c uses PAGE_ALIGN and brk syscall in ia32 emulation uses the sys_brk as it is.
Does this result in the situation that ia32 brk() behaves as if the page size is 16KB, though in reality 4KB?
From: "Hideki Yamamoto" <[email protected]>
Subject: [Linux-ia64] Re: Pagesize is different between IA32 and IA64
Date: Mon, 12 Nov 2001 17:29:53 +0900
Quoted 10 lines
I think the solution of this problem is which following them
-__getpagesizefunction should returns the real pagesize
- It needs to prepare the another function that returns real pagesize for malloc instead.I have confirmed this problem, the Kernel version is 2.4.7 and the libc version is 2.2.4.
This is a sample program.
Best regards.
--
NOMURA, Jun'ichi <[email protected], [email protected]> HPC Operating System Group, 1st Computers Software Division, Computers Software Operations Unit, NEC Solutions.