|
From: | Roland Schwingel |
Subject: | Problem with NSInvocation on Windows |
Date: | Mon, 08 Mar 2010 11:41:02 +0100 |
User-agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
Hi...There is a problem using NSInvocation on windows. It always allocates a windows native virtual memory page for it's informations. Depending on the windows version such a page can be very big and the number of these pages are limited. If you have a lot of NSInvocation instances this fragments your memory and you can also run out of virtual pages when you are using ffi invocations.
The attached (trivial) patch fixes this. It allocates pages now using malloc and later on adjusts the allocated memory flags using VirtualProtect().
Thanks for applying, Roland
[Prev in Thread] | Current Thread | [Next in Thread] |