On 07/04/2016 05:31 AM, Peter Lieven wrote:
+void *qemu_alloc_stack(size_t sz) +{ + void *ptr, *guardpage; + size_t pagesz = getpagesize(); + + /* avoid stacks smaller than _SC_THREAD_STACK_MIN */ + sz = MAX(sz, sysconf(_SC_THREAD_STACK_MIN));
...
+void qemu_free_stack(void *stack, size_t sz) +{ + sz = MAX(sz, sysconf(_SC_THREAD_STACK_MIN));
I think the MAX+sysconf expression should be hoisted to a common (static) function. With that,
Reviewed-by: Richard Henderson <r...@twiddle.net> r~