Lines Matching defs:stack
364 Protect the stack active area and the guard areas appropriately.
366 stack. On success, also sets *initial_sp to what the stack pointer
373 VgStack* stack;
377 /* Allocate the stack. */
385 stack = (VgStack*)(AddrH)sr_Res(sres);
388 aspacem_assert(VG_IS_PAGE_ALIGNED(stack));
392 (Addr) &stack[0],
397 (Addr) &stack->bytes[0],
402 (Addr) &stack->bytes[VG_STACK_GUARD_SZB + VG_STACK_ACTIVE_SZB],
407 (Addr) &stack->bytes[VG_STACK_GUARD_SZB + VG_STACK_ACTIVE_SZB],
414 p = (UInt*)&stack->bytes[VG_STACK_GUARD_SZB];
418 *initial_sp = (Addr)&stack->bytes[VG_STACK_GUARD_SZB + VG_STACK_ACTIVE_SZB];
422 VG_(debugLog)( 1,"aspacem","allocated thread stack at 0x%llx size %d\n",
423 (ULong)(Addr)stack, szB);
425 return stack;
428 /* The stack was allocated, but we can't protect it. Unmap it and
430 (void)ML_(am_do_munmap_NO_NOTIFY)( (Addr)stack, szB );
436 /* Figure out how many bytes of the stack's active area have not
439 SizeT VG_(am_get_VgStack_unused_szB)( VgStack* stack, SizeT limit )
444 p = (UInt*)&stack->bytes[VG_STACK_GUARD_SZB];