int main(int argc, char *argv[]) { int newlim = argc > 1 ? atoi(argv[1]) : 10; printf("%d\n", getThreadLimit()); setThreadLimit(newlim); printf("%d\n", getThreadLimit()); newlim = argc > 2 ? atoi(argv[2]) : 10; printf("%d\n", getStackLimit()); setStackLimit(newlim); printf("%d\n", getStackLimit()); return 0; }
void setGCStateCurrentThreadAndStack (GC_state s) { GC_thread thread; GC_stack stack; thread = getThreadCurrent (s); s->exnStack = thread->exnStack; stack = getStackCurrent (s); s->stackBottom = getStackBottom (s, stack); s->stackTop = getStackTop (s, stack); s->stackLimit = getStackLimit (s, stack); markCard (s, (pointer)stack); }