[Top][All Lists]

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

Re: NSArray: Problem allocating memory on stack on windows

From: Richard Frith-Macdonald
Subject: Re: NSArray: Problem allocating memory on stack on windows
Date: Tue, 14 Oct 2003 17:05:43 +0100

On Tuesday, October 14, 2003, at 04:26 PM, Frederic Stark wrote:


Roland Schwingel wrote:

Also a good idea.... In our tests we got problems with arrays >52000
As of the fact that the stack might be longer in some cases, it might be
enough to set the limit to about 32768 (isn't that a fine number)?

I don't think 32768 is a good choice:

1/ It let casual reader of the code thinking that it may have something to do with 2^15. He'll start to worry that, maybe, therte is a signed 2 byte number somewhere.

2/ It is way too big, as it would use more than half of the stack.

I would suspect that the good number is around 100.

There is now some experimental code in NSArray.m in CVS to use the heap for numbers of objects above 1000 (an arbitrary choice). It uses a couple of new macros which will probably eventually make their way to GSObjCRuntime.h once we've picked better names
and decided on a good number ... perhaps nearer 100.

reply via email to

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