> On Jul 5, 2016, at 2:27 AM, Jens Alfke <j...@mooseyard.com> wrote: > > If you absolutely need to preflight a huge memory allocation, I suggest > creating a temporary file, resizing it to the desired size by setting its > EOF, then using mmap to map the file into address space. (You should then > unlink the file, ensuring it’ll be cleaned up when your process exits.)
I was going to suggest the same thing. Basically, do your own VM if the allocation is over some threshold, say 25% or 50% of physical RAM. This will fail when you resize the file and won’t compete with the system’s VM. If the resize succeeds, you’re good to go. If your customer is on a SAN with 250GB free it will work — also it gives you the option of backing your huge allocations on a different drive (or drives) than the system VM. HTH, -Steve
_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com