(address, byteCount, prot, flags, fd, offset);
}
//libcore.io.Libcore.java
public final class Libcore... {
private Libcore() { }
public static Os rawOs = new Linux();
public static Os os = new ...BlockGuardOs(rawOs);
}
//libcore.io.Linux.java
public native long mmap(long address, long byteCount,... int prot, int flags, FileDescriptor fd, long offset) throws ErrnoException;
Libcore 中使用 BlockGuardOs...对 Linux 进行了一层包装,但实际还是通过 Linux 来执行的,最后调用到 Linux 中的 native mmap 方法,native 中对应的实现是 mmap.cpp:
void* mmap