diff --git a/lib/grading/test_threads.c b/lib/grading/test_threads.c index dfa3d5c..1f1c4f5 100644 --- a/lib/grading/test_threads.c +++ b/lib/grading/test_threads.c @@ -2,12 +2,16 @@ #include #include +#define PROCESS_COUNT 100 + void do_test_threads(void) { debug_printf("[do_test_threads]\n"); - struct spawninfo *si = malloc(sizeof(struct spawninfo)); - domainid_t *pid = malloc(sizeof(domainid_t)); + struct spawninfo *si = malloc(PROCESS_COUNT * sizeof(struct spawninfo)); + domainid_t *pid = malloc(PROCESS_COUNT * sizeof(domainid_t)); - CHECK_ERR(spawn_load_by_name("mallocator", si, pid)); + for(uint i = 0; i < PROCESS_COUNT; ++i) { + debug_printf("TEST_THREADS: spawn %u\n", i); + CHECK_ERR(spawn_load_by_name("mallocator", &(si[i]), &(pid[i]))); + } } - diff --git a/usr/mallocator/main.c b/usr/mallocator/main.c index 5f38b2c..4a7f459 100644 --- a/usr/mallocator/main.c +++ b/usr/mallocator/main.c @@ -26,8 +26,8 @@ int main(int argc, char *argv[]) //allocate a 256 MiB buffer char * big_buf = malloc(1<<28); big_buf[0] = 'a'; - for (int i = 0; i < (1 << 14); i += 4096) { - printf("%x\n", i); + for (int i = 0; i < (1 << 16); i += 4096) { + debug_printf("%x\n", i); big_buf[i] = 'b'; } } \ No newline at end of file