This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
dev:rts:heap [2015/04/06 15:55] – [General Information] ursgraf | dev:rts:heap [2016/02/25 13:33] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 10: | Line 10: | ||
There are 8 lists with block sizes of (Bytes) 16, 32, 48, 64, 80, 96, 112 and >= 128. At the very beginning there is no array with these lists. Therefore the allocation must be done "by hand". Only after the class constructor of the class //Heap// is executed the rest of the heap can be entered as a free block. \\ | There are 8 lists with block sizes of (Bytes) 16, 32, 48, 64, 80, 96, 112 and >= 128. At the very beginning there is no array with these lists. Therefore the allocation must be done "by hand". Only after the class constructor of the class //Heap// is executed the rest of the heap can be entered as a free block. \\ | ||
To be able to follow the free blocks (when searching a new block or when sweeping) the structure below is used: | To be able to follow the free blocks (when searching a new block or when sweeping) the structure below is used: | ||
- | [{{ .: | + | [{{ .: |
The field //size// holds the size of the block, //next// gives the address of the next free block. There is no java class for these free blocks. The reason for this is that free and used blocks must be efficiently changed into each other. | The field //size// holds the size of the block, //next// gives the address of the next free block. There is no java class for these free blocks. The reason for this is that free and used blocks must be efficiently changed into each other. | ||
[{{ .: | [{{ .: |