<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Le 9 août 2010 à 22:42, Ken Ferry a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Sun, Aug 8, 2010 at 9:20 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:reid.kleckner@gmail.com">reid.kleckner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sun, Aug 8, 2010 at 8:20 PM, Jakob Stoklund Olesen <<a href="mailto:stoklund@2pi.dk">stoklund@2pi.dk</a>> wrote:<br>
><br>
> On Aug 7, 2010, at 7:05 PM, Steven Noonan wrote:<br>
>> I've been doing work on memory reduction in Unladen Swallow, and<br>
>> during testing, LiveRanges seemed to be consuming one of the largest<br>
>> chunks of memory.<br>
><br>
> That's interesting. How did you measure this? I'd love to see your data.<br>
><br>
> Note that the LiveRange struct is allocated by a plain std::vector, and your patch doesn't change that. I assume you are talking about the VNInfo structs?<br>
<br>
</div>Steven has been using Instruments, and sending us screenshots. Does<br>
anyone else know a better way of exporting that data?<br></blockquote><div><br></div><div>So, just so you're aware, direct calls to mmap are not intercepted and reported by Instruments. So using mmap instead of malloc will make your _reported_ numbers go down, but that doesn't necessarily mean you have better performance. </div>
<div><br></div><div>This is a problem for people doing performance measurements on Mac OS X and iOS, because exotic memory allocation schemes seem to be becoming more common (I hope not because they dodge reporting!). In particular, may image buffers are allocated directly from mmap and vm_allocate, within CoreGraphics and elsewhere. </div>
</div></blockquote><br></div><div>If this is for Mac OS X, you can use malloc zone instead. They also provide a way to dealloc all memory at once, and they probably works with Instrument too.</div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div>-- Jean-Daniel</div><div><br></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></body></html>