diff options
Diffstat (limited to 'src/user/app/test')
-rw-r--r-- | src/user/app/test/main.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/user/app/test/main.c b/src/user/app/test/main.c index 3db24b3..2c42cf8 100644 --- a/src/user/app/test/main.c +++ b/src/user/app/test/main.c @@ -1,11 +1,15 @@ #include <tce/syscall.h> #include <stdio.h> +#include <stdlib.h> int threads = 1; void thread_cascade(void* d) { int n = (int)d; + char *v = malloc(2048); + if (!v) printk("!"); + if (d == 0) { //printk("{#} 0 cascade element started => end\n"); printk("*"); @@ -29,6 +33,8 @@ void thread_cascade(void* d) { printk("."); } + free(v); + threads--; } @@ -50,9 +56,9 @@ int main(int argc, char** args) { printk("\n"); } - printk("(test) Creating thread cascade (total 2**5 = 32 threads)\n"); + printk("(test) Creating thread cascade (total 2**6 = 64 threads)\n"); thread_new(useless_thread, 0); - thread_new(thread_cascade, (void*)5); + thread_new(thread_cascade, (void*)6); while (1) { schedule(); |