bug-gnustep
[Top][All Lists]
Advanced

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

Re: NSArray: Problem allocating memory on stack on windows


From: Roland Schwingel
Subject: Re: NSArray: Problem allocating memory on stack on windows
Date: Thu, 9 Oct 2003 12:45:42 +0200




Hi...


> But alloca is much quicker!  We don't want to loose that speed for small
> arrays.  I think the solution is:
>
>  if (c < 100)
>    use alloca as in the current code
>  else
>    use malloc()/free() as you suggest
>
> (replace 100 with another reasonable default if you want).
Also a good idea.... In our tests we got problems with arrays >52000
elements.
As of the fact that the stack might be longer in some cases, it might be
good
enough to set the limit to about 32768 (isn't that a fine number)?

Roland





reply via email to

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