Kernel/Threads: Dynamically allocate the TLS region for threads in the BASE region of the linear heap.

Each thread gets a 0x200-byte area from the 0x1000-sized page, when all 8 thread slots in a single page are used up, the kernel allocates a new page to hold another 8 entries.

This is consistent with what the real kernel does.
This commit is contained in:
Subv
2016-04-19 17:12:48 -05:00
parent 3e7e8daf59
commit d192fb066d
5 changed files with 74 additions and 28 deletions

View File

@ -109,7 +109,6 @@ struct MemoryArea {
static MemoryArea memory_areas[] = {
{SHARED_MEMORY_VADDR, SHARED_MEMORY_SIZE, "Shared Memory"}, // Shared memory
{VRAM_VADDR, VRAM_SIZE, "VRAM"}, // Video memory (VRAM)
{TLS_AREA_VADDR, TLS_AREA_SIZE, "TLS Area"}, // TLS memory
};
}