openexr-devel
[Top][All Lists]
Advanced

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

Re: [Openexr-devel] Re: Mac stuff


From: Paul Schneider
Subject: Re: [Openexr-devel] Re: Mac stuff
Date: Tue, 8 Apr 2003 15:47:58 -0700


Hi, Derek,

On OS X, the stack is practically only limited by your swap space.

Is that true? We've had problems with large stack-based arrays crashing on OS X inside the Piz compressor, even when building with gcc. The only documentation I could find on the issue was this:

http://developer.apple.com/techpubs/macosx/DeveloperTools/MachORuntime/ 2rt_powerpc_abi/chapter_3_section_4.html

This seems to suggest that the stack size is fixed even on X (and even in the Mach-O runtime), but it could be out of date.

My understanding is that the stack size is fixed, but the compiler is supposed to automatically set the stack size to the largest stack value ever needed. This breaks down if you're developing a shared library, because stack size is inherited from the host app in that case. This is how CFM worked on OS 9, and I was under the impression that this was still true on OS X.

If my understanding is incorrect, it would be good to know. Currently, the Piz compressor allocates some big arrays in the heap in the OS X builds, but places them on the stack when building for other targets. This is somewhat of a performance hit, so if it's unnecessary, please let me know.

If stack size turns out to really be an issue on OS X, we'll probably change HalfLut's array to an auto_ptr in the OS X builds, so that developers don't have to worry about creating HalfLuts on the stack.

- Paul






reply via email to

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