Should Wine use alloca or not?
Alexandre Julliard
julliard at winehq.com
Mon Feb 12 18:36:11 CST 2001
James Sutherland <jas88 at cam.ac.uk> writes:
> Last time this came up, someone had found the stack overflowing with a
> large allocation - something like the char foo[10*1024] Patrik mentions -
> and moved it to malloc(). At which point, someone else suggested turning
> the malloc() into an alloca(), since it's faster...
>
> At the time, there were some fairly tight stack constraints in
> places. Have these disappeared, or is alloca() still the wrong thing to
> do???
The stack space is limited to 1Mb per thread (unless the application
changed the defaults); it's not very tight, but it still means we
cannot allocate arbitrary-sized data.
--
Alexandre Julliard
julliard at winehq.com
More information about the wine-devel
mailing list