repo.or.cz
/
panda.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Ensure package passes distcheck
[panda.git]
/
docs
/
object-memory.txt
blob
a26ba197cb7fb55d19e2f0d9d4e6e53035c2b4a4
1
Object Memory Layout
2
----------------------
3
4
Legend
5
-------
6
mark: GC book-keeping (12 bits), Readonly (1 bit) Hash (20 bits), Tag (2 bits)
7
class oop: Oop to class of instance
8
9
Normal Object
10
11
[ mark ]
12
[ class ]
13
[ instance vars ] *
14
15
16
Array Object
17
18
[ mark ]
19
[ class ]
20
[ size ]
21
[ elements ] *
22
23
24
ByteArray Object
25
26
[ mark ]
27
[ class ]
28
[ size ]
29
[ bytes ] * (padded to oop size)
30
31
FloatArray Object
32
33
[ mark ]
34
[ class ]
35
[ size ]
36
[ C `double' ] *
37
38
LargeInteger Object
39
40
[ mark ]
41
[ class ]
42
[ size ]
43
[ C `mp_int' struct ]
44
45
Class/Metaclass Object
46
47
[ mark ]
48
[ class ]
49
[ vtable ]
50
[ instance size ]
51
[ instance variables ]
52
[ class pool ]
53
[ name ]
54
[ superclass ]
55
[ method dictionary ]
56
57
58
59
60