On Thu, Oct 31, 2013 at 12:16 PM, Patrick Walton <[email protected]>wrote:

> On 10/30/13 4:12 PM, Robert O'Callahan wrote:
>
>> Since tasks don't share heaps, bounding their memory usage seems
>> tractable; it becomes an accounting problem. Instead of using explicit
>> counters I suggest following the lead of Gecko's MemShrink project and
>> building infrastructure to compute the memory usage of a task by walking
>> its heap.
>>
>
> They do though, through ARCs and RWarcs. I don't expect they're a large
> portion of memory usage though.
>

For ARCs it may be good enough to just charge each task with the cost of
the object.

RWarcs are worse. However, tasks that share a RWarc can't generally fail
independently, I assume. So one possibility is to group tasks into units of
failure, require that RWarcs can only be shared within such units, and
account for memory usage at failure-unit granularity.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to