site_archiver@lists.apple.com Delivered-To: Cocoa-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1657796334; x= 1657882734; bh=2S4H264PuRtYuhbHug67gwXYDj/mVnDriizjLQW9+WM=; b=m RmtOvSFVx9MJNm3iJQ5fw+1Qkbs/M2clmE2E0bXP0EgTArMIkKZczQ/FqMl/+NSk ur4OSsZPn4J1lBiMfEIFRtnSh4bCIVa7Ok8fplIJUTVPKycOK5Fw8QTs3eDIy0HF XzYSnlM1JfWFce+iu3l2WDfk8J7B8u0BPylbpHd1IT5pG9iuV69voqt0J6zeZqvF S0+b+V5YK1F6MORUzOR0Y9OA+U2p8YpcwfEIQeA2UnnVDYevL6QuulkIEyJmSlAj F2sgG7vg7gP2HHUp3MRi40cmfmknFH6L9oHm8Avolj8akBu1NZuWJVlmuKD7hIU7 ETVB8uHx8O3QOM0W57ZFA== Feedback-id: i01794759:Fastmail My app, Cog (https://cog.losno.co <https://cog.losno.co/> / https://github.com/losnoco/Cog <https://github.com/losnoco/Cog>) is hitting the stack size limit of 512 KiB on macOS. I am not even making heavy use of local variables. I am, however, making a lot of Cocoa object allocations and deletions, and using several nested autoreleasepools, and somehow, this, combined with the C/C++/assembly libraries my app is using for file decoding, hits the stack size limit. I had to raise it for some recent additions. The recent additions do not use local variables most of the time. In fact, they all use new/delete or malloc/free already for large memory allocations. Yet somehow, I am hitting the stack size limit rather easily. I wish there were some sort of tool in Instruments that could organize memory allocations in use throughout the process by which ones are specific to the stack, so I could locate why my stack size is so grossly inflated. I've already added a bodge for file playback threads by invoking NSThread with setStackSize before starting it, but I also hit the limit with metadata reading threads, which are invoked by NSOperationQueue, where I don't have control over the stack size limit. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com