]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - kernel/tests/aspace.cc
update
[polintos/scott/priv.git] / kernel / tests / aspace.cc
index 694021ebc507dd16c7bab594d3dc1a1c2cebb902..a8b53e682a37807843690290df112ae24900bb45 100644 (file)
@@ -24,7 +24,7 @@ namespace Mem {
        extern IMappable physmem;
 }
 
-void thread(void *arg)
+void thread(void *arg1, void *arg2)
 {
        // Yuck -- out param->return value promotion would turn it into
        // AddrSpace aspace = AddrSpace::downcast(Mem::proc_addr_space_factory.create()),
@@ -57,7 +57,8 @@ void thread(void *arg)
               (void *)stacked[0], (void *)stacked[1],
               (void *)mappables[0], (void *)mappables[1]);
                
-       char *buf = new char[100000];
+//     char *buf = new char[100000];
+       char *buf = (char *)alloc_pages(25);
        printf("buf %p\n", buf);
        
        char *abuf = (char *)((((ulong)buf) + 4095) & ~4095);
@@ -148,5 +149,5 @@ void thread(void *arg)
 
 void run_test()
 {
-       Threads::sched.new_thread(thread, NULL, "thread")->wake();
+       Threads::sched.new_thread(thread, NULL, NULL, "thread")->wake();
 }