Os.sysconf
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using libcore.io.Os.sysconf (Showing top 20 results out of 315)

origin: robovm/robovm

/**
 * Returns the number of processor cores available to the VM, at least 1.
 * Traditionally this returned the number currently online,
 * but many mobile devices are able to take unused cores offline to
 * save power, so releases newer than Android 4.2 (Jelly Bean) return the maximum number of
 * cores that could be made available if there were no power or heat
 * constraints.
 */
public int availableProcessors() {
  return (int) Libcore.os.sysconf(_SC_NPROCESSORS_CONF);
}
origin: robovm/robovm

public long sysconf(int name) { return os.sysconf(name); }
public void tcdrain(FileDescriptor fd) throws ErrnoException { os.tcdrain(fd); }
origin: robovm/robovm

/**
 * 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;
 }
}
origin: robovm/robovm

long alignment = position - position % Libcore.os.sysconf(_SC_PAGE_SIZE);
int offset = (int) (position - alignment);
MemoryBlock block = MemoryBlock.mmap(fd, alignment, size + offset, mapMode);
origin: MobiVM/robovm

/**
 * Returns the number of processor cores available to the VM, at least 1.
 * Traditionally this returned the number currently online,
 * but many mobile devices are able to take unused cores offline to
 * save power, so releases newer than Android 4.2 (Jelly Bean) return the maximum number of
 * cores that could be made available if there were no power or heat
 * constraints.
 */
public int availableProcessors() {
  return (int) Libcore.os.sysconf(_SC_NPROCESSORS_CONF);
}
origin: ibinti/bugvm

/**
 * Returns the number of processor cores available to the VM, at least 1.
 * Traditionally this returned the number currently online,
 * but many mobile devices are able to take unused cores offline to
 * save power, so releases newer than Android 4.2 (Jelly Bean) return the maximum number of
 * cores that could be made available if there were no power or heat
 * constraints.
 */
public int availableProcessors() {
  return (int) Libcore.os.sysconf(_SC_NPROCESSORS_CONF);
}
origin: com.gluonhq/robovm-rt

/**
 * Returns the number of processor cores available to the VM, at least 1.
 * Traditionally this returned the number currently online,
 * but many mobile devices are able to take unused cores offline to
 * save power, so releases newer than Android 4.2 (Jelly Bean) return the maximum number of
 * cores that could be made available if there were no power or heat
 * constraints.
 */
public int availableProcessors() {
  return (int) Libcore.os.sysconf(_SC_NPROCESSORS_CONF);
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns the number of processor cores available to the VM, at least 1.
 * Traditionally this returned the number currently online,
 * but many mobile devices are able to take unused cores offline to
 * save power, so releases newer than Android 4.2 (Jelly Bean) return the maximum number of
 * cores that could be made available if there were no power or heat
 * constraints.
 */
public int availableProcessors() {
  return (int) Libcore.os.sysconf(_SC_NPROCESSORS_CONF);
}
origin: com.bugvm/bugvm-rt

/**
 * Returns the number of processor cores available to the VM, at least 1.
 * Traditionally this returned the number currently online,
 * but many mobile devices are able to take unused cores offline to
 * save power, so releases newer than Android 4.2 (Jelly Bean) return the maximum number of
 * cores that could be made available if there were no power or heat
 * constraints.
 */
public int availableProcessors() {
  return (int) Libcore.os.sysconf(_SC_NPROCESSORS_CONF);
}
origin: FlexoVM/flexovm

/**
 * Returns the number of processor cores available to the VM, at least 1.
 * Traditionally this returned the number currently online,
 * but many mobile devices are able to take unused cores offline to
 * save power, so releases newer than Android 4.2 (Jelly Bean) return the maximum number of
 * cores that could be made available if there were no power or heat
 * constraints.
 */
public int availableProcessors() {
  return (int) Libcore.os.sysconf(_SC_NPROCESSORS_CONF);
}
origin: ibinti/bugvm

public long sysconf(int name) { return os.sysconf(name); }
public void tcdrain(FileDescriptor fd) throws ErrnoException { os.tcdrain(fd); }
origin: com.mobidevelop.robovm/robovm-rt

public long sysconf(int name) { return os.sysconf(name); }
public void tcdrain(FileDescriptor fd) throws ErrnoException { os.tcdrain(fd); }
origin: MobiVM/robovm

public long sysconf(int name) { return os.sysconf(name); }
public void tcdrain(FileDescriptor fd) throws ErrnoException { os.tcdrain(fd); }
origin: com.bugvm/bugvm-rt

public long sysconf(int name) { return os.sysconf(name); }
public void tcdrain(FileDescriptor fd) throws ErrnoException { os.tcdrain(fd); }
origin: com.gluonhq/robovm-rt

public long sysconf(int name) { return os.sysconf(name); }
public void tcdrain(FileDescriptor fd) throws ErrnoException { os.tcdrain(fd); }
origin: FlexoVM/flexovm

public long sysconf(int name) { return os.sysconf(name); }
public void tcdrain(FileDescriptor fd) throws ErrnoException { os.tcdrain(fd); }
origin: MobiVM/robovm

/**
 * 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;
 }
}
origin: ibinti/bugvm

/**
 * 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;
 }
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * 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;
 }
}
origin: com.gluonhq/robovm-rt

/**
 * 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;
 }
}
libcore.ioOssysconf

Popular methods of Os

  • accept
  • access
  • bind
  • chmod
  • chown
  • close
  • connect
  • dup
  • dup2
  • environ
  • execv
  • execve
  • execv,
  • execve,
  • fchmod,
  • fchown,
  • fcntlFlock,
  • fcntlLong,
  • fcntlVoid,
  • fdatasync,
  • fstat,
  • fstatvfs

Popular in Java

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Join (org.hibernate.mapping)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)