Skip to content

Commit

Permalink
rescue 3-5 + convert alignment 2 apparently it was not used
Browse files Browse the repository at this point in the history
  • Loading branch information
Ducasse committed Dec 8, 2024
1 parent b43dfd6 commit 51a18e0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions Part0-Preamble/1-ObjectStructure/figures/Alignment2-ascii.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

32 bits 64 bits
| | | |
+-----------+ +-----------+
| | | |
|===========| aligned addresses |===========|
| | | |
+-----------+ +-----------+
| | | |
+-----------+ +-----------+
| | | |
+-----------+ +-----------+
| | | |
|===========| multiple of 4 octets +-----------+
| | | |
+-----------+ +-----------+
| | | |
+-----------+ +-----------+
| | | |
+-----------+ +-----------+
| | | |
|===========| multiple of 8 octets |===========|
| | | |
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Part0-Preamble/1-ObjectStructure/objectStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ There are two kinds of oops: object pointers to other objects and immediate obje
- Pointers work as normal pointers in low-level languages.
- Immediate objects are objects encoded in invalid object pointers using a technique called _tagged pointers_ that takes advantage of pointer alignment.

![References are pointers to an object's base header. Immediate objects embed value inside the references.%anchor=reference3](figures/references3.pdf)
![References are pointers to an object's base header. Immediate objects embed value inside the references.%anchor=reference3](figures/references3AndImmediate.pdf)

Every object in Pharo has an address in memory, which is the memory address of its base header.
An object `A` references an object `B` with an absolute pointer to `B`'s base header stored in one of `A`'s reference slots.
Expand Down

0 comments on commit 51a18e0

Please sign in to comment.