[Top][All Lists]

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

Re: Enlarge MAX_ALLOCA?

From: Eli Zaretskii
Subject: Re: Enlarge MAX_ALLOCA?
Date: Fri, 20 Jun 2014 11:56:30 +0300

> Date: Fri, 20 Jun 2014 12:38:03 +0400
> From: Dmitry Antipov <address@hidden>
> Cc: David Kastrup <address@hidden>, address@hidden
> On 06/19/2014 10:21 PM, Stefan Monnier wrote:
> >> 64kB feels arbitrary.  I cannot really think of an architecture where
> >> 64kB would be feasible and 128kB not.  ±32kB is a plausible offset for
> >> some architectures.
> >
> > This has nothing to do with machine architectures.
> > It's only related to the OS chosen size of the stack.
> IIUC this means that if alloca is limited to < 32K, stack may be expanded
> with just one instruction because increment fits into an immediate operand.
> Otherwise there should be a few more load/store/add instructions.

OK, but is that worse than using xmalloc in that case?

reply via email to

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