[Mono-dev] 回复: Why Create OutOfMemoryException will cause some dataofsgen_cardtable be masked
xiaozhu
niluzhou1984 at foxmail.com
Wed May 16 09:53:02 UTC 2018
I get it. Thank you vlad.Thank you Marek.
------------------ 原始邮件 ------------------
发件人: "Vlad Brezae"<brezaevlad at gmail.com>;
发送时间: 2018年5月16日(星期三) 下午4:52
收件人: "xiaozhu"<niluzhou1984 at foxmail.com>;
抄送: "Marek Safar"<marek.safar at gmail.com>; "mono-devel-list"<mono-devel-list at lists.dot.net>;
主题: Re: [Mono-dev] Why Create OutOfMemoryException will cause some dataofsgen_cardtable be masked
Hey,
The card table is used keep track of stores of references to minor generation objects inside objects of the major generation (generally). As you can imagine, these stores happen mostly in JIT compiled code (which starts after the runtime invoke) and it doesn't make sense to transition to native code each time. This cardtable marking is called the write barrier and you can see how it is emitted in mini_emit_write_barrier. For the general case this generates the assembly associated with OP_CARD_TABLE_WBARRIER.
Especially at startup we might have some objects that are allocated directly in the major heap, so there can be cardtable markings without yet having any collections and normal object promotion.
Vlad
On Wed, May 16, 2018 at 11:29 AM, xiaozhu <niluzhou1984 at foxmail.com> wrote:
Thank You ,Marek .
Thank You , Vlad
------------------ 原始邮件 ------------------
发件人: "Marek Safar"<marek.safar at gmail.com>;
发送时间: 2018年5月16日(星期三) 下午3:14
收件人: "xiaozhu"<niluzhou1984 at foxmail.com>;"Vlad Brezae"<brezaevlad at gmail.com>;
抄送: "mono-devel-list"<mono-devel-list at lists.dot.net>;
主题: Re: [Mono-dev] Why Create OutOfMemoryException will cause some dataof sgen_cardtable be masked
Hello,
I am cc-ing Vlad who can answer your question.
Marek
On Wed, May 9, 2018 at 7:41 AM, xiaozhu <niluzhou1984 at foxmail.com> wrote:
hi,all I'm doing some research of sgen_cardtable of the embeded mono.
And find that ,after the mono_jit_init_version call , some bytes of sgen_cardtable is aready setted.
Some of the call in mono_jit_init_version will call sgen_card_table_wbarrier_set_field to change some bytes of sgen_cardtable.
But there is one exception that change the memory of sgen_cardtable without call any of the sgen_cardtable method.
That exception is the invoke of the Constructor of System.OutOfMemoryException.
The Call Chain is
1.mono_jit_init_version
2.mini_init
3.mono_runtime_init_checked
4.create_domain_objects
5.mono_exception_from_name_two_strings_checked
6.create_exception_two_strings
7.mono_runtime_invoke_checked
I have tested the newest stable release of mono,The result is the same.
The Quesition is :
Why call the ctor of System.OutOfMemoryException will cause some byte of sgen_cardtable be setted without call any method
of sgen_cardtable.
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.dot.net
http://lists.dot.net/mailman/listinfo/mono-devel-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-devel-list/attachments/20180516/bb895215/attachment-0001.html>
More information about the Mono-devel-list
mailing list