qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/6] oslib-posix: add helpers for stack alloc an


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1/6] oslib-posix: add helpers for stack alloc and free
Date: Mon, 4 Jul 2016 12:34:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1


On 04/07/2016 12:25, Peter Lieven wrote:
>>>
>> No, you just pass the stack and the runtime takes care of initializing
>> the two stack pointers:
>>
>>      uc.uc_link = &old_uc;
>>      uc.uc_stack.ss_sp = co->stack;
>>      uc.uc_stack.ss_size = stack_size;
>>      uc.uc_stack.ss_flags = 0;
> 
> So, you would basically copy the if/elif part from allocatestack.c ?

Yes, but note that _STACK_GROWS_{DOWN,UP} and
NEED_SEPARATE_REGISTER_STACK are glibc-specific.  You need to use
HOST_IA64 and HOST_HPPA.

> In this case I would also count the guardpage as part of the stack, so
> that the usable stack size is actually reduced by one page?

Yes.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]