Skip to content

Instantly share code, notes, and snippets.

@DiveInto
Created August 12, 2020 16:15
Show Gist options
  • Save DiveInto/9b332c163016171174a683366303e29b to your computer and use it in GitHub Desktop.
Save DiveInto/9b332c163016171174a683366303e29b to your computer and use it in GitHub Desktop.
sync.B object internals:
OFFSET SIZE TYPE DESCRIPTION VALUE
0 4 (object header) 05 00 00 00 (00000101 00000000 00000000 00000000) (5)
4 4 (object header) 00 00 00 00 (00000000 00000000 00000000 00000000) (0)
8 4 (object header) 9c aa 16 00 (10011100 10101010 00010110 00000000) (1485468)
12 4 (loss due to the next object alignment)
Instance size: 16 bytes
Space losses: 0 bytes internal + 4 bytes external = 4 bytes total
t1 lock ing
sync.B object internals:
OFFSET SIZE TYPE DESCRIPTION VALUE
0 4 (object header) 05 c0 8a bd (00000101 11000000 10001010 10111101) (-1114980347)
4 4 (object header) 86 7f 00 00 (10000110 01111111 00000000 00000000) (32646)
8 4 (object header) 9c aa 16 00 (10011100 10101010 00010110 00000000) (1485468)
12 4 (loss due to the next object alignment)
Instance size: 16 bytes
Space losses: 0 bytes internal + 4 bytes external = 4 bytes total
t1 release
t1 main lock
sync.B object internals:
OFFSET SIZE TYPE DESCRIPTION VALUE
0 4 (object header) 02 59 fd bc (00000010 01011001 11111101 10111100) (-1124247294)
4 4 (object header) 86 7f 00 00 (10000110 01111111 00000000 00000000) (32646)
8 4 (object header) 9c aa 16 00 (10011100 10101010 00010110 00000000) (1485468)
12 4 (loss due to the next object alignment)
Instance size: 16 bytes
Space losses: 0 bytes internal + 4 bytes external = 4 bytes total
after lock
sync.B object internals:
OFFSET SIZE TYPE DESCRIPTION VALUE
0 4 (object header) 02 59 fd bc (00000010 01011001 11111101 10111100) (-1124247294)
4 4 (object header) 86 7f 00 00 (10000110 01111111 00000000 00000000) (32646)
8 4 (object header) 9c aa 16 00 (10011100 10101010 00010110 00000000) (1485468)
12 4 (loss due to the next object alignment)
Instance size: 16 bytes
Space losses: 0 bytes internal + 4 bytes external = 4 bytes total
after gc()
sync.B object internals:
OFFSET SIZE TYPE DESCRIPTION VALUE
0 4 (object header) 01 00 00 00 (00000001 00000000 00000000 00000000) (1)
4 4 (object header) 00 00 00 00 (00000000 00000000 00000000 00000000) (0)
8 4 (object header) 9c aa 16 00 (10011100 10101010 00010110 00000000) (1485468)
12 4 (loss due to the next object alignment)
Instance size: 16 bytes
Space losses: 0 bytes internal + 4 bytes external = 4 bytes total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment