| design.md |
|
11328 |
- |
| qv4heap_p.h |
|
5157 |
- |
| qv4mm.cpp |
Max overallocation by the GC in % |
59173 |
- |
| qv4mm_p.h |
|
19923 |
- |
| qv4mmdefs_p.h |
Chunks are the basic structure containing GC managed objects.
Chunks are 64k aligned in memory, so that retrieving the Chunk pointer from a Heap object
is a simple masking operation. Each Chunk has 4 bitmaps for managing purposes,
and 32byte wide slots for the objects following afterwards.
The black bitmaps are used for mark/sweep.
The object bitmap has a bit set if this location represents the start of a Heap object.
The extends bitmap denotes the extend of an object. It has a cleared bit at the start of the object
and a set bit for all following slots used by the object.
Free memory has both used and extends bits set to 0.
This gives the following operations when allocating an object of size s:
Find s/Alignment consecutive free slots in the chunk. Set the object bit for the first
slot to 1. Set the extends bits for all following slots to 1.
All used slots can be found by object|extents.
When sweeping, simply copy the black bits over to the object bits.
|
11716 |
- |
| qv4stacklimits.cpp |
|
11086 |
- |
| qv4stacklimits_p.h |
|
2890 |
- |
| qv4writebarrier.cpp |
|
1127 |
- |
| qv4writebarrier_p.h |
similar Heap::Pointer, but without the Base conversion (and its inUse assert)
and for storing references in engine classes stored on the native heap
Stores a "non-owning" reference to a heap-item (in the C++ sense), but should
generally mark the heap-item; therefore set goes through a write-barrier
|
4456 |
- |