F*******i 发帖数: 190 | 1 Daxia,
one question, which lib has the mmap function? Is it libc or from kernel?
thanks! |
S*A 发帖数: 7142 | 2 libc has mmap system call wrappers.
kernel has the real function to do the mmap.
【在 F*******i 的大作中提到】 : Daxia, : one question, which lib has the mmap function? Is it libc or from kernel? : thanks!
|
F*******i 发帖数: 190 | 3 man, really appreciate the insights!
【在 S*A 的大作中提到】 : libc has mmap system call wrappers. : kernel has the real function to do the mmap.
|
F*******i 发帖数: 190 | 4 one more question SSA.
If i have a program use mmap, will the kernel static linked to my program
or dynmamic linked for mmap?
thanks again!
【在 S*A 的大作中提到】 : libc has mmap system call wrappers. : kernel has the real function to do the mmap.
|
j*a 发帖数: 14423 | 5 this question is invalid.
【在 F*******i 的大作中提到】 : one more question SSA. : If i have a program use mmap, will the kernel static linked to my program : or dynmamic linked for mmap? : thanks again!
|
F*******i 发帖数: 190 | 6 so suppose i compile a A program in kernel KA, and run it in kernel KB,
it will use the mmap implementation from KB?
thanks again
【在 j*a 的大作中提到】 : this question is invalid.
|
j*a 发帖数: 14423 | 7 true.
A - glibc - K
【在 F*******i 的大作中提到】 : so suppose i compile a A program in kernel KA, and run it in kernel KB, : it will use the mmap implementation from KB? : thanks again
|
F*******i 发帖数: 190 | 8 thanks a lot
【在 j*a 的大作中提到】 : true. : A - glibc - K
|
S*A 发帖数: 7142 | 9 Yes, it will use the mmap in KB.
Mmap system call, like every other system call, it is just an INT 80h
with some register value set as arguments. It is pretty much like
BIOS call except that is the kernel receiving it. Glibc might use
syscall instruction instead of the INT 80h. But it is really the same.
【在 F*******i 的大作中提到】 : so suppose i compile a A program in kernel KA, and run it in kernel KB, : it will use the mmap implementation from KB? : thanks again
|
F*******i 发帖数: 190 | 10 thanks!
【在 S*A 的大作中提到】 : Yes, it will use the mmap in KB. : Mmap system call, like every other system call, it is just an INT 80h : with some register value set as arguments. It is pretty much like : BIOS call except that is the kernel receiving it. Glibc might use : syscall instruction instead of the INT 80h. But it is really the same.
|