public final class jdk.internal.foreign.MemoryScope
  minor version: 0
  major version: 59
  flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
  this_class: jdk.internal.foreign.MemoryScope
  super_class: java.lang.Object
{
  final java.lang.Object ref;
    descriptor: Ljava/lang/Object;
    flags: (0x0010) ACC_FINAL

  int activeCount;
    descriptor: I
    flags: (0x0000) 

  static final java.lang.invoke.VarHandle COUNT_HANDLE;
    descriptor: Ljava/lang/invoke/VarHandle;
    flags: (0x0018) ACC_STATIC, ACC_FINAL

  static final int UNACQUIRED;
    descriptor: I
    flags: (0x0018) ACC_STATIC, ACC_FINAL
    ConstantValue: 0

  static final int CLOSED;
    descriptor: I
    flags: (0x0018) ACC_STATIC, ACC_FINAL
    ConstantValue: -1

  static final int MAX_ACQUIRE;
    descriptor: I
    flags: (0x0018) ACC_STATIC, ACC_FINAL
    ConstantValue: 2147483647

  final java.lang.Runnable cleanupAction;
    descriptor: Ljava/lang/Runnable;
    flags: (0x0010) ACC_FINAL

  static void <clinit>();
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=4, locals=1, args_size=0
         0: .line 49
            invokestatic java.lang.invoke.MethodHandles.lookup:()Ljava/lang/invoke/MethodHandles$Lookup;
            ldc Ljdk/internal/foreign/MemoryScope;
            ldc "activeCount"
            getstatic java.lang.Integer.TYPE:Ljava/lang/Class;
            invokevirtual java.lang.invoke.MethodHandles$Lookup.findVarHandle:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;
            putstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
         1: .line 50
            goto 4
      StackMap locals:
      StackMap stack: java.lang.Throwable
         2: astore 0 /* ex */
        start local 0 // java.lang.Throwable ex
         3: .line 51
            new java.lang.ExceptionInInitializerError
            dup
            aload 0 /* ex */
            invokespecial java.lang.ExceptionInInitializerError.<init>:(Ljava/lang/Throwable;)V
            athrow
        end local 0 // java.lang.Throwable ex
         4: .line 57
      StackMap locals:
      StackMap stack:
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            3    4     0    ex  Ljava/lang/Throwable;
      Exception table:
        from    to  target  type
           0     1       2  Class java.lang.Throwable

  public void <init>(java.lang.Object, java.lang.Runnable);
    descriptor: (Ljava/lang/Object;Ljava/lang/Runnable;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=3, args_size=3
        start local 0 // jdk.internal.foreign.MemoryScope this
        start local 1 // java.lang.Object ref
        start local 2 // java.lang.Runnable cleanupAction
         0: .line 61
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 43
            aload 0 /* this */
            iconst_0
            putfield jdk.internal.foreign.MemoryScope.activeCount:I
         2: .line 62
            aload 0 /* this */
            aload 1 /* ref */
            putfield jdk.internal.foreign.MemoryScope.ref:Ljava/lang/Object;
         3: .line 63
            aload 0 /* this */
            aload 2 /* cleanupAction */
            putfield jdk.internal.foreign.MemoryScope.cleanupAction:Ljava/lang/Runnable;
         4: .line 64
            return
        end local 2 // java.lang.Runnable cleanupAction
        end local 1 // java.lang.Object ref
        end local 0 // jdk.internal.foreign.MemoryScope this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0    5     0           this  Ljdk/internal/foreign/MemoryScope;
            0    5     1            ref  Ljava/lang/Object;
            0    5     2  cleanupAction  Ljava/lang/Runnable;
    MethodParameters:
               Name  Flags
      ref            
      cleanupAction  

  final boolean isAliveThreadSafe();
    descriptor: ()Z
    flags: (0x0010) ACC_FINAL
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // jdk.internal.foreign.MemoryScope this
         0: .line 70
            getstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
            aload 0 /* this */
            invokevirtual java.lang.invoke.VarHandle.getVolatile:(Ljdk/internal/foreign/MemoryScope;)I
            iconst_m1
            if_icmpeq 1
            iconst_1
            ireturn
      StackMap locals:
      StackMap stack:
         1: iconst_0
            ireturn
        end local 0 // jdk.internal.foreign.MemoryScope this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/internal/foreign/MemoryScope;

  final void checkAliveConfined();
    descriptor: ()V
    flags: (0x0010) ACC_FINAL
    Code:
      stack=3, locals=1, args_size=1
        start local 0 // jdk.internal.foreign.MemoryScope this
         0: .line 77
            aload 0 /* this */
            getfield jdk.internal.foreign.MemoryScope.activeCount:I
            iconst_m1
            if_icmpne 2
         1: .line 78
            new java.lang.IllegalStateException
            dup
            ldc "Segment is not alive"
            invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
            athrow
         2: .line 80
      StackMap locals:
      StackMap stack:
            return
        end local 0 // jdk.internal.foreign.MemoryScope this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    3     0  this  Ljdk/internal/foreign/MemoryScope;

  jdk.internal.foreign.MemoryScope acquire();
    descriptor: ()Ljdk/internal/foreign/MemoryScope;
    flags: (0x0000) 
    Code:
      stack=5, locals=2, args_size=1
        start local 0 // jdk.internal.foreign.MemoryScope this
         0: .line 85
      StackMap locals:
      StackMap stack:
            getstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
            aload 0 /* this */
            invokevirtual java.lang.invoke.VarHandle.getVolatile:(Ljdk/internal/foreign/MemoryScope;)I
            istore 1 /* value */
        start local 1 // int value
         1: .line 86
            iload 1 /* value */
            iconst_m1
            if_icmpne 3
         2: .line 88
            new java.lang.IllegalStateException
            dup
            ldc "Segment is not alive"
            invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
            athrow
         3: .line 89
      StackMap locals: int
      StackMap stack:
            iload 1 /* value */
            ldc 2147483647
            if_icmpne 5
         4: .line 91
            new java.lang.IllegalStateException
            dup
            ldc "Segment acquire limit exceeded"
            invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
            athrow
         5: .line 93
      StackMap locals:
      StackMap stack:
            getstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
            aload 0 /* this */
            iload 1 /* value */
            iload 1 /* value */
            iconst_1
            iadd
            invokevirtual java.lang.invoke.VarHandle.compareAndSet:(Ljdk/internal/foreign/MemoryScope;II)Z
            ifeq 0
         6: .line 94
            new jdk.internal.foreign.MemoryScope
            dup
            aload 0 /* this */
            getfield jdk.internal.foreign.MemoryScope.ref:Ljava/lang/Object;
            aload 0 /* this */
            invokedynamic run(Ljdk/internal/foreign/MemoryScope;)Ljava/lang/Runnable;
              Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
                Method arguments:
                  ()V
                  jdk/internal/foreign/MemoryScope.release()V (7)
                  ()V
            invokespecial jdk.internal.foreign.MemoryScope.<init>:(Ljava/lang/Object;Ljava/lang/Runnable;)V
            areturn
        end local 1 // int value
        end local 0 // jdk.internal.foreign.MemoryScope this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    7     0   this  Ljdk/internal/foreign/MemoryScope;
            1    7     1  value  I

  private void release();
    descriptor: ()V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=5, locals=2, args_size=1
        start local 0 // jdk.internal.foreign.MemoryScope this
         0: .line 100
      StackMap locals:
      StackMap stack:
            getstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
            aload 0 /* this */
            invokevirtual java.lang.invoke.VarHandle.getVolatile:(Ljdk/internal/foreign/MemoryScope;)I
            istore 1 /* value */
        start local 1 // int value
         1: .line 101
            iload 1 /* value */
            ifgt 3
         2: .line 103
            new java.lang.IllegalStateException
            dup
            invokespecial java.lang.IllegalStateException.<init>:()V
            athrow
         3: .line 105
      StackMap locals: int
      StackMap stack:
            getstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
            aload 0 /* this */
            iload 1 /* value */
            iload 1 /* value */
            iconst_1
            isub
            invokevirtual java.lang.invoke.VarHandle.compareAndSet:(Ljdk/internal/foreign/MemoryScope;II)Z
            ifeq 0
         4: .line 106
            return
        end local 1 // int value
        end local 0 // jdk.internal.foreign.MemoryScope this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    5     0   this  Ljdk/internal/foreign/MemoryScope;
            1    5     1  value  I

  void close();
    descriptor: ()V
    flags: (0x0000) 
    Code:
      stack=4, locals=1, args_size=1
        start local 0 // jdk.internal.foreign.MemoryScope this
         0: .line 109
            getstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
            aload 0 /* this */
            iconst_0
            iconst_m1
            invokevirtual java.lang.invoke.VarHandle.compareAndSet:(Ljdk/internal/foreign/MemoryScope;II)Z
            ifne 3
         1: .line 111
            aload 0 /* this */
            invokevirtual jdk.internal.foreign.MemoryScope.checkAliveConfined:()V
         2: .line 113
            new java.lang.IllegalStateException
            dup
            ldc "Cannot close a segment that has active acquired views"
            invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
            athrow
         3: .line 115
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.internal.foreign.MemoryScope.cleanupAction:Ljava/lang/Runnable;
            ifnull 5
         4: .line 116
            aload 0 /* this */
            getfield jdk.internal.foreign.MemoryScope.cleanupAction:Ljava/lang/Runnable;
            invokeinterface java.lang.Runnable.run:()V
         5: .line 118
      StackMap locals:
      StackMap stack:
            return
        end local 0 // jdk.internal.foreign.MemoryScope this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    6     0  this  Ljdk/internal/foreign/MemoryScope;
}
SourceFile: "MemoryScope.java"
InnerClasses:
  public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles