Class SafeMemory

    • Constructor Detail

      • SafeMemory

        public SafeMemory​(long size)
    • Method Detail

      • sharedCopy

        public SafeMemory sharedCopy()
        Specified by:
        sharedCopy in interface SharedCloseable
        Returns:
        a new instance of the object representing the same state and backed by the same underlying resources. Coordinates with the original (and other instances) when the underlying resource should be closed. Throws an exception if the shared resource has already been closed.
      • free

        public void free()
        Overrides:
        free in class Memory
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Overrides:
        close in class Memory
      • close

        public java.lang.Throwable close​(java.lang.Throwable accumulate)
        Specified by:
        close in interface SharedCloseable
      • checkBounds

        @Inline
        protected void checkBounds​(long start,
                                   long end)
        Overrides:
        checkBounds in class Memory