Home | History | Annotate | Download | only in alloc

Lines Matching refs:stack

55 static bool createMarkStack(GcMarkStack *stack)
61 /* Create a stack big enough for the worst possible case,
63 * TODO: be better about memory usage; use a smaller stack with
69 name = "dalvik-mark-stack";
75 stack->limit = limit;
76 stack->base = (const Object **)((uintptr_t)limit + size);
77 stack->top = stack->base;
81 static void destroyMarkStack(GcMarkStack *stack)
83 munmap((char *)stack->limit,
84 (uintptr_t)stack->base - (uintptr_t)stack->limit);
85 memset(stack, 0, sizeof(*stack));
88 #define MARK_STACK_PUSH(stack, obj) \
90 *--(stack).top = (obj); \
97 if (!createMarkStack(&ctx->stack)) {
125 /* This object will need to go on the mark stack.
127 MARK_STACK_PUSH(ctx->stack, obj);
142 * need to be added to the mark stack.
171 * - Interpreted stack, from top to "curFrame"
189 * - Native stack (for in-progress stuff in the VM)
254 * a white reference it is pushed on the mark stack and grayed.
535 const Object **const base = ctx->stack.base;
537 /* Scan anything that's on the mark stack.
542 while (ctx->stack.top != base) {
543 scanObject(*ctx->stack.top++, ctx);
632 * live objects will be marked and the mark stack will be empty.
646 * left on the mark stack.
659 * that gray objects will be pushed onto the mark stack.
905 destroyMarkStack(&ctx->stack);