Re: confusion about memory fragmentation, vm, and blocks
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=hv7TYo/AHofx2rmRELVoqVK/1M33xEZz9oBVkGs+tDo=; b=iadchwJad79pQnfSgELsTCi1WB8t26RytKtutBqSGcTOoRxI//JuFag2RXc7gCbU2a wOd0W+V4ylVgRugyFKDdLVlFfcP1IKt/F+2PpLSPUyjkG2avC57UTMiLGOLHJiR3ROxy YviZN/jWBcqbbds6VRldam0LytHMG8allqBns= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=jQbfpDdaIQRiCGh5HmG9Pyc8fqLOqur/uuCBe/bS2ozY2MtJ3C1dRFeU8i34RtF0n7 rijIak0c9oAfu4lHyp/rFXLZGH+sKLQ41dnyLe/Oz3mlrDIyK6QzbRPYs8oyBeCcIdh2 +xBZNcrc6tbS+cg3UH7f55dshvqOzD0IYgSio=
Can I read up details about that pre-allocated space? Is there a good tutorial or technote? I understand it is quite a lot VM that my application consumes upon startup, about 1GB. It seems a fair amount given that I do 3D rendering and whatnot, but I would still be curious to reduce it. (I've asked about that in a separate thread (Why is virtual memory so high? (crash)) a while ago, but have not yet found a definitive conclusion.
Try reading up on virtual memory in general - many of the VM principles used by Mach aren't Mach-specific. Also, take a look at _Mac OS X Internals_ by Amit Singh - the entire chapter 8 deals with Mach-specific VM. (I just bought the book a few weeks ago and am very impressed.) Also, as you optimize your code, bear in mind that the memory figures for any given app doesn't necessarily reflect the app's complexity. For example, building a Cocoa app with a single blank window claims ~300 MB virtual memory. My point being, don't lose too much sleep over why your app is using X memory - it could be perfectly normal. Good luck, David _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Dave Keck