/** * Unmaps this memory-mapped file using munmap(2). This is a no-op if close has already been * called. Note that this class does <i>not</i> use finalization; you must call {@code close} * yourself. * * Calling this method invalidates any iterators over this {@code MemoryMappedFile}. It is an * error to use such an iterator after calling {@code close}. */ public synchronized void close() throws ErrnoException { if (address != 0) { Libcore.os.munmap(address, size); address = 0; } }
public void munmap(long address, long byteCount) throws ErrnoException { os.munmap(address, byteCount); } public FileDescriptor open(String path, int flags, int mode) throws ErrnoException { return os.open(path, flags, mode); }
@Override public void free() { if (address != 0) { try { Libcore.os.munmap(address, size); } catch (ErrnoException errnoException) { // The RI doesn't throw, presumably on the assumption that you can't get into // a state where munmap(2) could return an error. throw new AssertionError(errnoException); } address = 0; } }
/** * Unmaps this memory-mapped file using munmap(2). This is a no-op if close has already been * called. Note that this class does <i>not</i> use finalization; you must call {@code close} * yourself. * * Calling this method invalidates any iterators over this {@code MemoryMappedFile}. It is an * error to use such an iterator after calling {@code close}. */ public synchronized void close() throws ErrnoException { if (address != 0) { Libcore.os.munmap(address, size); address = 0; } }
/** * Unmaps this memory-mapped file using munmap(2). This is a no-op if close has already been * called. Note that this class does <i>not</i> use finalization; you must call {@code close} * yourself. * * Calling this method invalidates any iterators over this {@code MemoryMappedFile}. It is an * error to use such an iterator after calling {@code close}. */ public synchronized void close() throws ErrnoException { if (address != 0) { Libcore.os.munmap(address, size); address = 0; } }
/** * Unmaps this memory-mapped file using munmap(2). This is a no-op if close has already been * called. Note that this class does <i>not</i> use finalization; you must call {@code close} * yourself. * * Calling this method invalidates any iterators over this {@code MemoryMappedFile}. It is an * error to use such an iterator after calling {@code close}. */ public synchronized void close() throws ErrnoException { if (address != 0) { Libcore.os.munmap(address, size); address = 0; } }
/** * Unmaps this memory-mapped file using munmap(2). This is a no-op if close has already been * called. Note that this class does <i>not</i> use finalization; you must call {@code close} * yourself. * * Calling this method invalidates any iterators over this {@code MemoryMappedFile}. It is an * error to use such an iterator after calling {@code close}. */ public synchronized void close() throws ErrnoException { if (address != 0) { Libcore.os.munmap(address, size); address = 0; } }
/** * Unmaps this memory-mapped file using munmap(2). This is a no-op if close has already been * called. Note that this class does <i>not</i> use finalization; you must call {@code close} * yourself. * * Calling this method invalidates any iterators over this {@code MemoryMappedFile}. It is an * error to use such an iterator after calling {@code close}. */ public synchronized void close() throws ErrnoException { if (address != 0) { Libcore.os.munmap(address, size); address = 0; } }
public void munmap(long address, long byteCount) throws ErrnoException { os.munmap(address, byteCount); } public FileDescriptor open(String path, int flags, int mode) throws ErrnoException { return os.open(path, flags, mode); }
/** * Unmaps this memory-mapped file using munmap(2). This is a no-op if close has already been * called. Note that this class does <i>not</i> use finalization; you must call {@code close} * yourself. * * Calling this method invalidates any iterators over this {@code MemoryMappedFile}. It is an * error to use such an iterator after calling {@code close}. */ public synchronized void close() throws ErrnoException { if (address != 0) { Libcore.os.munmap(address, size); address = 0; } }
public void munmap(long address, long byteCount) throws ErrnoException { os.munmap(address, byteCount); } public FileDescriptor open(String path, int flags, int mode) throws ErrnoException { return os.open(path, flags, mode); }
public void munmap(long address, long byteCount) throws ErrnoException { os.munmap(address, byteCount); } public FileDescriptor open(String path, int flags, int mode) throws ErrnoException { return os.open(path, flags, mode); }
public void munmap(long address, long byteCount) throws ErrnoException { os.munmap(address, byteCount); } public FileDescriptor open(String path, int flags, int mode) throws ErrnoException { return os.open(path, flags, mode); }
public void munmap(long address, long byteCount) throws ErrnoException { os.munmap(address, byteCount); } public FileDescriptor open(String path, int flags, int mode) throws ErrnoException { return os.open(path, flags, mode); }
@Override public void free() { if (address != 0) { try { Libcore.os.munmap(address, size); } catch (ErrnoException errnoException) { // The RI doesn't throw, presumably on the assumption that you can't get into // a state where munmap(2) could return an error. throw new AssertionError(errnoException); } address = 0; } }
@Override public void free() { if (address != 0) { try { Libcore.os.munmap(address, size); } catch (ErrnoException errnoException) { // The RI doesn't throw, presumably on the assumption that you can't get into // a state where munmap(2) could return an error. throw new AssertionError(errnoException); } address = 0; } }
@Override public void free() { if (address != 0) { try { Libcore.os.munmap(address, size); } catch (ErrnoException errnoException) { // The RI doesn't throw, presumably on the assumption that you can't get into // a state where munmap(2) could return an error. throw new AssertionError(errnoException); } address = 0; } }
@Override public void free() { if (address != 0) { try { Libcore.os.munmap(address, size); } catch (ErrnoException errnoException) { // The RI doesn't throw, presumably on the assumption that you can't get into // a state where munmap(2) could return an error. throw new AssertionError(errnoException); } address = 0; } }
@Override public void free() { if (address != 0) { try { Libcore.os.munmap(address, size); } catch (ErrnoException errnoException) { // The RI doesn't throw, presumably on the assumption that you can't get into // a state where munmap(2) could return an error. throw new AssertionError(errnoException); } address = 0; } }
@Override public void free() { if (address != 0) { try { Libcore.os.munmap(address, size); } catch (ErrnoException errnoException) { // The RI doesn't throw, presumably on the assumption that you can't get into // a state where munmap(2) could return an error. throw new AssertionError(errnoException); } address = 0; } }