forked from CosmosOS/Cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue when SMT Table expands to larger than one page
- Loading branch information
Showing
6 changed files
with
168 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Object | ||
|
||
## Memory Layout | ||
|
||
Each object is allocated with a header of three ints. The first int is the type of the object, the second int is the instance type of object (normal, boxed, array etc) and the third is the size in memory. | ||
|
||
## Garbage Collector Information | ||
|
||
The garbage collector itself also alloctes its own header of 1 int (2 ushort). The first ushort is the allocated size of the object while the second tracks the GC information. | ||
The GC information is made up of a 1bit flag (the lowest bit) used to track if the GC has hit the object during the sweep phase already and the upper 7 bits count how many static references there are to the object. | ||
|
||
Combined in memory we have the foramt | ushort: memory size | ushort: gc info | uint: object type | uint: instance type | uint: object size | variable: object data | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.