fix: preallocate thread

This commit is contained in:
Martin Eyben 2025-04-25 16:07:29 +02:00
parent 217c79b3ac
commit 0b2b0143e5

View File

@ -296,7 +296,7 @@ void __attribute__((constructor)) setup_main_thread()
// Create an entry for the main thread. // Create an entry for the main thread.
struct context_entry_t *new_entry; struct context_entry_t *new_entry;
for (int i = 0; i < 10000; ++i) { for (int i = 0; i < 5000; ++i) {
new_entry = malloc(sizeof(*new_entry)); new_entry = malloc(sizeof(*new_entry));
memset(new_entry->stack, 0, STACK_SIZE); memset(new_entry->stack, 0, STACK_SIZE);