public void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { os.mincore(address, byteCount, vector); } public void mkdir(String path, int mode) throws ErrnoException { os.mkdir(path, mode); }
/** * Returns true if there is a high probability that every page of this buffer is currently * loaded in RAM, meaning that accesses will not cause a page fault. It is impossible to give * a strong guarantee since this is only a snapshot of a dynamic situation. */ public final boolean isLoaded() { checkIsMapped(); long address = block.toLong(); long size = block.getSize(); if (size == 0) { return true; } try { int pageSize = (int) Libcore.os.sysconf(_SC_PAGE_SIZE); int pageOffset = (int) (address % pageSize); address -= pageOffset; size += pageOffset; int pageCount = (int) ((size + pageSize - 1) / pageSize); byte[] vector = new byte[pageCount]; Libcore.os.mincore(address, size, vector); for (int i = 0; i < vector.length; ++i) { if ((vector[i] & 1) != 1) { return false; } } return true; } catch (ErrnoException errnoException) { return false; } }
public void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { os.mincore(address, byteCount, vector); } public void mkdir(String path, int mode) throws ErrnoException { os.mkdir(path, mode); }
public void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { os.mincore(address, byteCount, vector); } public void mkdir(String path, int mode) throws ErrnoException { os.mkdir(path, mode); }
public void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { os.mincore(address, byteCount, vector); } public void mkdir(String path, int mode) throws ErrnoException { os.mkdir(path, mode); }
public void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { os.mincore(address, byteCount, vector); } public void mkdir(String path, int mode) throws ErrnoException { os.mkdir(path, mode); }
public void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { os.mincore(address, byteCount, vector); } public void mkdir(String path, int mode) throws ErrnoException { os.mkdir(path, mode); }
public void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { os.mincore(address, byteCount, vector); } public void mkdir(String path, int mode) throws ErrnoException { os.mkdir(path, mode); }
/** * Returns true if there is a high probability that every page of this buffer is currently * loaded in RAM, meaning that accesses will not cause a page fault. It is impossible to give * a strong guarantee since this is only a snapshot of a dynamic situation. */ public final boolean isLoaded() { checkIsMapped(); long address = block.toLong(); long size = block.getSize(); if (size == 0) { return true; } try { int pageSize = (int) Libcore.os.sysconf(_SC_PAGE_SIZE); int pageOffset = (int) (address % pageSize); address -= pageOffset; size += pageOffset; int pageCount = (int) ((size + pageSize - 1) / pageSize); byte[] vector = new byte[pageCount]; Libcore.os.mincore(address, size, vector); for (int i = 0; i < vector.length; ++i) { if ((vector[i] & 1) != 1) { return false; } } return true; } catch (ErrnoException errnoException) { return false; } }
/** * Returns true if there is a high probability that every page of this buffer is currently * loaded in RAM, meaning that accesses will not cause a page fault. It is impossible to give * a strong guarantee since this is only a snapshot of a dynamic situation. */ public final boolean isLoaded() { checkIsMapped(); long address = block.toLong(); long size = block.getSize(); if (size == 0) { return true; } try { int pageSize = (int) Libcore.os.sysconf(_SC_PAGE_SIZE); int pageOffset = (int) (address % pageSize); address -= pageOffset; size += pageOffset; int pageCount = (int) ((size + pageSize - 1) / pageSize); byte[] vector = new byte[pageCount]; Libcore.os.mincore(address, size, vector); for (int i = 0; i < vector.length; ++i) { if ((vector[i] & 1) != 1) { return false; } } return true; } catch (ErrnoException errnoException) { return false; } }
/** * Returns true if there is a high probability that every page of this buffer is currently * loaded in RAM, meaning that accesses will not cause a page fault. It is impossible to give * a strong guarantee since this is only a snapshot of a dynamic situation. */ public final boolean isLoaded() { checkIsMapped(); long address = block.toLong(); long size = block.getSize(); if (size == 0) { return true; } try { int pageSize = (int) Libcore.os.sysconf(_SC_PAGE_SIZE); int pageOffset = (int) (address % pageSize); address -= pageOffset; size += pageOffset; int pageCount = (int) ((size + pageSize - 1) / pageSize); byte[] vector = new byte[pageCount]; Libcore.os.mincore(address, size, vector); for (int i = 0; i < vector.length; ++i) { if ((vector[i] & 1) != 1) { return false; } } return true; } catch (ErrnoException errnoException) { return false; } }
/** * Returns true if there is a high probability that every page of this buffer is currently * loaded in RAM, meaning that accesses will not cause a page fault. It is impossible to give * a strong guarantee since this is only a snapshot of a dynamic situation. */ public final boolean isLoaded() { checkIsMapped(); long address = block.toLong(); long size = block.getSize(); if (size == 0) { return true; } try { int pageSize = (int) Libcore.os.sysconf(_SC_PAGE_SIZE); int pageOffset = (int) (address % pageSize); address -= pageOffset; size += pageOffset; int pageCount = (int) ((size + pageSize - 1) / pageSize); byte[] vector = new byte[pageCount]; Libcore.os.mincore(address, size, vector); for (int i = 0; i < vector.length; ++i) { if ((vector[i] & 1) != 1) { return false; } } return true; } catch (ErrnoException errnoException) { return false; } }
/** * Returns true if there is a high probability that every page of this buffer is currently * loaded in RAM, meaning that accesses will not cause a page fault. It is impossible to give * a strong guarantee since this is only a snapshot of a dynamic situation. */ public final boolean isLoaded() { checkIsMapped(); long address = block.toLong(); long size = block.getSize(); if (size == 0) { return true; } try { int pageSize = (int) Libcore.os.sysconf(_SC_PAGE_SIZE); int pageOffset = (int) (address % pageSize); address -= pageOffset; size += pageOffset; int pageCount = (int) ((size + pageSize - 1) / pageSize); byte[] vector = new byte[pageCount]; Libcore.os.mincore(address, size, vector); for (int i = 0; i < vector.length; ++i) { if ((vector[i] & 1) != 1) { return false; } } return true; } catch (ErrnoException errnoException) { return false; } }
/** * Returns true if there is a high probability that every page of this buffer is currently * loaded in RAM, meaning that accesses will not cause a page fault. It is impossible to give * a strong guarantee since this is only a snapshot of a dynamic situation. */ public final boolean isLoaded() { checkIsMapped(); long address = block.toLong(); long size = block.getSize(); if (size == 0) { return true; } try { int pageSize = (int) Libcore.os.sysconf(_SC_PAGE_SIZE); int pageOffset = (int) (address % pageSize); address -= pageOffset; size += pageOffset; int pageCount = (int) ((size + pageSize - 1) / pageSize); byte[] vector = new byte[pageCount]; Libcore.os.mincore(address, size, vector); for (int i = 0; i < vector.length; ++i) { if ((vector[i] & 1) != 1) { return false; } } return true; } catch (ErrnoException errnoException) { return false; } }