SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
kkamegawa(かめがわ かずし):@kkamegawa
       kkamegawa@clueup.org
   http://d.hatena.ne.jp/kkamegawa
   かめがわ かずし
   某企業でフロントエンドからバックエンドま
    で手広くいろんなことやってます
   最近は@ITでチューニングやらデバッガや
    ら比較的ニッチなところを書いています。
    http://www.atmarkit.co.jp/fdotnet/chu
    shin/vsperf_index/index.html
    アプリケーションのギアを上げよう
    http://www.atmarkit.co.jp/fdotnet/chu
    shin/vsdebug_index/index.html
    Visual Studioデバッグ手法
知っているようで知らない?
 長ったらしく書くとApplication Domain。
 マネージプロセスが必ず一つ持ち、多く作れ
  ます。
 最初の一つ以外いつでも削除できます。

 いくつかの例外を除いて、ドメインごとにアセ
  ンブリを管理します。
 作ったAppDomainを削除すると、ドメイン内
  で呼び出しているアセンブリも一緒にアンロー
  ドされます。
AppDomain #1(既定)                                AppDomain #2

                     Hoo.exe                                        Bar1.dll

ローダーヒープ                                  ローダーヒープ

                      Bar1.dll                                      Bar2.dll



                     System.dll                                 System.dll




                          ドメイン中立アセンブリ

                ローダーヒープ             MSCorLib.dll
                                                                    必要に応じてAppDomainを作成
                                                                     (普通は既定の一つでいい
                                                                      名前は自分で考えよう)


                                  .NET Framework 4
     MSCorEE.DLL /                    CLR.DLL
     MSCorEEi.DLL
        (shim)                    .NET Framework 2.0/3.0/3.5
                                       MSCorWks.DLL
   AppDomain.Unload
    (AppDomain.CurrentDomain);
    で終わらせようとするとどうなる?


      CannotAppDomainUnloadExceptionが
      スローされる
      (ま、普通やりませんよね)
 AppDomainってどのくらい作れる?
 メモリへのインパクトは?
 1000個のAppDomain作成/消去
  (ドメイン固有のアセンブリ呼び出しはなし)
 作成はあまり時間かからないが、消去は結構
  かかっている
 Loader Heap, Working Set, Private

  bytesはAppDomainを消去してもそれなりに。
 Loader Heapは適当なところでGCが発生
   http://support.microsoft.com/kb/979744/j
    a (パッチあり)
    .NET Framework 2.0 ベースの Multi-
    AppDomain アプリケーションを実行したと
    きにアプリケーションが応答しなくなる
普通やりませんが…
 All-In-One-Code-Frameworkにある
  CppHostCLRというソリューションがサンプル
  http://1code.codeplex.com/
 ICorRuntimeHost, ICLRRuntimeHostを使

  用したサンプル。ただし、どちらもCLR2以降し
  かロードできない
  (今更.NET 1.1のホスティングいらないよね?)
CLRCreateInstance



 ICLRMetaHost->GetRuntime()



ICLRRuntimeInfo->IsLoadable()



ICLRRuntimeInfo->GetInferface()



   ICorRuntimeHost->Start()
 CLRの開始まではそんなに難しくない
 アンマネージドからマネージのインスタンスメ
  ソッドを呼び出そうとすると結構大変。
 staticメソッド呼ぶだけなら
  ICLRRuntimeHost->
   ExecuteInDefaultAppDomain()でOK
 お仕事であるいは趣味で「.NETのこのクラスラ

  イブラリ使いたい」と思ったときはどうぞ
 Internet Explorer
 IIS
     IIS6まではWorker ProcessがCLRをホストして
      いました。
     IIS7以降の統合モードではIIS自身がホストしま
      す。クラッシックモードではWorker Processが使
      われます。
 SQL Server 2005以降(SQLCLRがある)。
 PowerShell
 たぶん99.9%の人は複数ドメイン作らなくても
  やっていけます。昔はプラグインのために使う
  こともありましたが、今はMEFがありますし。
 そして、CLRのホストは99.999%くらいの人は

  知らなくてもやっていけるかと思います。
 ここもMCPの試験範囲なので出ますよ。
  2nd時代にこの本だけ読んでMCP受けました。
   プログラミング.NET Framework 第二版
   プログラミング.NET Framework 第三版
   Root of .NET Framework
   MSDN Library(ホストの概要)
    http://msdn.microsoft.com/ja-
    jp/library/dd380850.aspx
   MSDN Library(アプリケーションドメイン)
    http://msdn.microsoft.com/ja-
    jp/library/2bh4z9hs.aspx
第8回c#ユーザー会-AppDomain

Mais conteúdo relacionado

Semelhante a 第8回c#ユーザー会-AppDomain

今さら聞けない! Windows Server 2016 Active Directoryドメインサービス入門
今さら聞けない! Windows Server 2016 Active Directoryドメインサービス入門今さら聞けない! Windows Server 2016 Active Directoryドメインサービス入門
今さら聞けない! Windows Server 2016 Active Directoryドメインサービス入門Tetsuya Yokoyama
 
インサイドShell:.NETハッキング技術を応用したPowerShell可視性の向上 by 丹田 賢
インサイドShell:.NETハッキング技術を応用したPowerShell可視性の向上 by  丹田 賢インサイドShell:.NETハッキング技術を応用したPowerShell可視性の向上 by  丹田 賢
インサイドShell:.NETハッキング技術を応用したPowerShell可視性の向上 by 丹田 賢CODE BLUE
 
Rhodes mobile Framework (Japanese)
Rhodes mobile Framework (Japanese)Rhodes mobile Framework (Japanese)
Rhodes mobile Framework (Japanese)Yoshi Sakai
 
Howtoよいデザイン
HowtoよいデザインHowtoよいデザイン
HowtoよいデザインHiroki Yagita
 
Newcomer2020 Docker研修
Newcomer2020 Docker研修Newcomer2020 Docker研修
Newcomer2020 Docker研修Suguru Yazawa
 
Malwat4 20130223 analyzing_android_malware
Malwat4 20130223 analyzing_android_malwareMalwat4 20130223 analyzing_android_malware
Malwat4 20130223 analyzing_android_malwareAyase
 
CMake multiplatform build-tool
CMake multiplatform build-toolCMake multiplatform build-tool
CMake multiplatform build-toolNaruto TAKAHASHI
 
捕鯨!詳解docker
捕鯨!詳解docker捕鯨!詳解docker
捕鯨!詳解docker雄哉 吉田
 
ソースコードの共通化
ソースコードの共通化ソースコードの共通化
ソースコードの共通化Jun Hosokawa
 
RoR周辺知識15項目
RoR周辺知識15項目RoR周辺知識15項目
RoR周辺知識15項目saiwaki
 
Java/Androidセキュアコーディング
Java/AndroidセキュアコーディングJava/Androidセキュアコーディング
Java/AndroidセキュアコーディングMasaki Kubo
 
17 E-5 震災とHackとクラウドと 亀渕分
17 E-5 震災とHackとクラウドと 亀渕分17 E-5 震災とHackとクラウドと 亀渕分
17 E-5 震災とHackとクラウドと 亀渕分Keiji Kamebuchi
 
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)Daisuke Ikeda
 
Cocos2d-x公開講座 in 鹿児島
Cocos2d-x公開講座 in 鹿児島Cocos2d-x公開講座 in 鹿児島
Cocos2d-x公開講座 in 鹿児島Tomoaki Shimizu
 
2012-04-25 ASPLOS2012出張報告(公開版)
2012-04-25 ASPLOS2012出張報告(公開版)2012-04-25 ASPLOS2012出張報告(公開版)
2012-04-25 ASPLOS2012出張報告(公開版)Takahiro Shinagawa
 
【学習メモ#1st】12ステップで作る組込みOS自作入門
【学習メモ#1st】12ステップで作る組込みOS自作入門【学習メモ#1st】12ステップで作る組込みOS自作入門
【学習メモ#1st】12ステップで作る組込みOS自作入門sandai
 
東京Node学園#3 Domains & Isolates
東京Node学園#3 Domains & Isolates東京Node学園#3 Domains & Isolates
東京Node学園#3 Domains & Isolateskoichik
 

Semelhante a 第8回c#ユーザー会-AppDomain (20)

DartVM on Android
DartVM on AndroidDartVM on Android
DartVM on Android
 
今さら聞けない! Windows Server 2016 Active Directoryドメインサービス入門
今さら聞けない! Windows Server 2016 Active Directoryドメインサービス入門今さら聞けない! Windows Server 2016 Active Directoryドメインサービス入門
今さら聞けない! Windows Server 2016 Active Directoryドメインサービス入門
 
インサイドShell:.NETハッキング技術を応用したPowerShell可視性の向上 by 丹田 賢
インサイドShell:.NETハッキング技術を応用したPowerShell可視性の向上 by  丹田 賢インサイドShell:.NETハッキング技術を応用したPowerShell可視性の向上 by  丹田 賢
インサイドShell:.NETハッキング技術を応用したPowerShell可視性の向上 by 丹田 賢
 
Rhodes mobile Framework (Japanese)
Rhodes mobile Framework (Japanese)Rhodes mobile Framework (Japanese)
Rhodes mobile Framework (Japanese)
 
Howtoよいデザイン
HowtoよいデザインHowtoよいデザイン
Howtoよいデザイン
 
20050903
2005090320050903
20050903
 
Newcomer2020 Docker研修
Newcomer2020 Docker研修Newcomer2020 Docker研修
Newcomer2020 Docker研修
 
Malwat4 20130223 analyzing_android_malware
Malwat4 20130223 analyzing_android_malwareMalwat4 20130223 analyzing_android_malware
Malwat4 20130223 analyzing_android_malware
 
CMake multiplatform build-tool
CMake multiplatform build-toolCMake multiplatform build-tool
CMake multiplatform build-tool
 
捕鯨!詳解docker
捕鯨!詳解docker捕鯨!詳解docker
捕鯨!詳解docker
 
ソースコードの共通化
ソースコードの共通化ソースコードの共通化
ソースコードの共通化
 
RoR周辺知識15項目
RoR周辺知識15項目RoR周辺知識15項目
RoR周辺知識15項目
 
Java/Androidセキュアコーディング
Java/AndroidセキュアコーディングJava/Androidセキュアコーディング
Java/Androidセキュアコーディング
 
active directory-slideshare
active directory-slideshareactive directory-slideshare
active directory-slideshare
 
17 E-5 震災とHackとクラウドと 亀渕分
17 E-5 震災とHackとクラウドと 亀渕分17 E-5 震災とHackとクラウドと 亀渕分
17 E-5 震災とHackとクラウドと 亀渕分
 
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
 
Cocos2d-x公開講座 in 鹿児島
Cocos2d-x公開講座 in 鹿児島Cocos2d-x公開講座 in 鹿児島
Cocos2d-x公開講座 in 鹿児島
 
2012-04-25 ASPLOS2012出張報告(公開版)
2012-04-25 ASPLOS2012出張報告(公開版)2012-04-25 ASPLOS2012出張報告(公開版)
2012-04-25 ASPLOS2012出張報告(公開版)
 
【学習メモ#1st】12ステップで作る組込みOS自作入門
【学習メモ#1st】12ステップで作る組込みOS自作入門【学習メモ#1st】12ステップで作る組込みOS自作入門
【学習メモ#1st】12ステップで作る組込みOS自作入門
 
東京Node学園#3 Domains & Isolates
東京Node学園#3 Domains & Isolates東京Node学園#3 Domains & Isolates
東京Node学園#3 Domains & Isolates
 

Mais de Kazushi Kamegawa

「何もしないのにCIが失敗した」を防ぐ
「何もしないのにCIが失敗した」を防ぐ「何もしないのにCIが失敗した」を防ぐ
「何もしないのにCIが失敗した」を防ぐKazushi Kamegawa
 
Ignite 2021秋 recap - 開発者向け新機能紹介
Ignite 2021秋 recap - 開発者向け新機能紹介Ignite 2021秋 recap - 開発者向け新機能紹介
Ignite 2021秋 recap - 開発者向け新機能紹介Kazushi Kamegawa
 
Azure boards for beginners
Azure boards for beginnersAzure boards for beginners
Azure boards for beginnersKazushi Kamegawa
 
Deploy Strategy with Azure Pipelines
Deploy Strategy with Azure PipelinesDeploy Strategy with Azure Pipelines
Deploy Strategy with Azure PipelinesKazushi Kamegawa
 
DevOps and compliance and security
DevOps and compliance and securityDevOps and compliance and security
DevOps and compliance and securityKazushi Kamegawa
 
DevOps and Compliance and Security
DevOps and Compliance and SecurityDevOps and Compliance and Security
DevOps and Compliance and SecurityKazushi Kamegawa
 
Ignite 2021 振り返り(DevOps)
Ignite 2021 振り返り(DevOps)Ignite 2021 振り返り(DevOps)
Ignite 2021 振り返り(DevOps)Kazushi Kamegawa
 
How to create your own Azure Pipeline's image
How to create your own Azure Pipeline's imageHow to create your own Azure Pipeline's image
How to create your own Azure Pipeline's imageKazushi Kamegawa
 
Azure DevOps入門~TechLab編
Azure DevOps入門~TechLab編Azure DevOps入門~TechLab編
Azure DevOps入門~TechLab編Kazushi Kamegawa
 
Introduce TFSUG and Azure DevOps Server 2020
Introduce TFSUG and Azure DevOps Server 2020Introduce TFSUG and Azure DevOps Server 2020
Introduce TFSUG and Azure DevOps Server 2020Kazushi Kamegawa
 
Azure DevOps Online Vol.3 - Inside Azure Pipelines
Azure DevOps Online Vol.3 - Inside Azure PipelinesAzure DevOps Online Vol.3 - Inside Azure Pipelines
Azure DevOps Online Vol.3 - Inside Azure PipelinesKazushi Kamegawa
 
Getting Start for Azure Pipelines
Getting Start for Azure PipelinesGetting Start for Azure Pipelines
Getting Start for Azure PipelinesKazushi Kamegawa
 
Azure Boards and Azure Test Plans inside out.
Azure Boards and Azure Test Plans inside out.Azure Boards and Azure Test Plans inside out.
Azure Boards and Azure Test Plans inside out.Kazushi Kamegawa
 
Azure DevOps Management in Organization
Azure DevOps Management in OrganizationAzure DevOps Management in Organization
Azure DevOps Management in OrganizationKazushi Kamegawa
 
What's new Azure DevOps in //Build 2019
What's new Azure DevOps in //Build 2019What's new Azure DevOps in //Build 2019
What's new Azure DevOps in //Build 2019Kazushi Kamegawa
 
Deploy to Azure by ??? Azure Repos or GitHub
Deploy to Azure by ??? Azure Repos or GitHubDeploy to Azure by ??? Azure Repos or GitHub
Deploy to Azure by ??? Azure Repos or GitHubKazushi Kamegawa
 
Azure DevOpsとセキュリティ
Azure DevOpsとセキュリティAzure DevOpsとセキュリティ
Azure DevOpsとセキュリティKazushi Kamegawa
 

Mais de Kazushi Kamegawa (20)

「何もしないのにCIが失敗した」を防ぐ
「何もしないのにCIが失敗した」を防ぐ「何もしないのにCIが失敗した」を防ぐ
「何もしないのにCIが失敗した」を防ぐ
 
Ignite 2021秋 recap - 開発者向け新機能紹介
Ignite 2021秋 recap - 開発者向け新機能紹介Ignite 2021秋 recap - 開発者向け新機能紹介
Ignite 2021秋 recap - 開発者向け新機能紹介
 
Azure boards for beginners
Azure boards for beginnersAzure boards for beginners
Azure boards for beginners
 
Deploy Strategy with Azure Pipelines
Deploy Strategy with Azure PipelinesDeploy Strategy with Azure Pipelines
Deploy Strategy with Azure Pipelines
 
DevOps and compliance and security
DevOps and compliance and securityDevOps and compliance and security
DevOps and compliance and security
 
DevOps and Compliance and Security
DevOps and Compliance and SecurityDevOps and Compliance and Security
DevOps and Compliance and Security
 
Ignite 2021 振り返り(DevOps)
Ignite 2021 振り返り(DevOps)Ignite 2021 振り返り(DevOps)
Ignite 2021 振り返り(DevOps)
 
How to create your own Azure Pipeline's image
How to create your own Azure Pipeline's imageHow to create your own Azure Pipeline's image
How to create your own Azure Pipeline's image
 
NET5 and Diagnostics
NET5 and DiagnosticsNET5 and Diagnostics
NET5 and Diagnostics
 
Azure DevOps入門~TechLab編
Azure DevOps入門~TechLab編Azure DevOps入門~TechLab編
Azure DevOps入門~TechLab編
 
Introduce TFSUG and Azure DevOps Server 2020
Introduce TFSUG and Azure DevOps Server 2020Introduce TFSUG and Azure DevOps Server 2020
Introduce TFSUG and Azure DevOps Server 2020
 
Azure DevOps Online Vol.3 - Inside Azure Pipelines
Azure DevOps Online Vol.3 - Inside Azure PipelinesAzure DevOps Online Vol.3 - Inside Azure Pipelines
Azure DevOps Online Vol.3 - Inside Azure Pipelines
 
Getting Start for Azure Pipelines
Getting Start for Azure PipelinesGetting Start for Azure Pipelines
Getting Start for Azure Pipelines
 
Azure Boards and Azure Test Plans inside out.
Azure Boards and Azure Test Plans inside out.Azure Boards and Azure Test Plans inside out.
Azure Boards and Azure Test Plans inside out.
 
Azure DevOps's security
Azure DevOps's securityAzure DevOps's security
Azure DevOps's security
 
Azure DevOps Management in Organization
Azure DevOps Management in OrganizationAzure DevOps Management in Organization
Azure DevOps Management in Organization
 
What's new Azure DevOps in //Build 2019
What's new Azure DevOps in //Build 2019What's new Azure DevOps in //Build 2019
What's new Azure DevOps in //Build 2019
 
Deploy to Azure by ??? Azure Repos or GitHub
Deploy to Azure by ??? Azure Repos or GitHubDeploy to Azure by ??? Azure Repos or GitHub
Deploy to Azure by ??? Azure Repos or GitHub
 
Azure DevOpsとセキュリティ
Azure DevOpsとセキュリティAzure DevOpsとセキュリティ
Azure DevOpsとセキュリティ
 
What's Azure DevOps
What's Azure DevOpsWhat's Azure DevOps
What's Azure DevOps
 

Último

TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 

Último (9)

TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 

第8回c#ユーザー会-AppDomain

  • 1. kkamegawa(かめがわ かずし):@kkamegawa kkamegawa@clueup.org http://d.hatena.ne.jp/kkamegawa
  • 2. かめがわ かずし  某企業でフロントエンドからバックエンドま で手広くいろんなことやってます  最近は@ITでチューニングやらデバッガや ら比較的ニッチなところを書いています。 http://www.atmarkit.co.jp/fdotnet/chu shin/vsperf_index/index.html アプリケーションのギアを上げよう http://www.atmarkit.co.jp/fdotnet/chu shin/vsdebug_index/index.html Visual Studioデバッグ手法
  • 4.  長ったらしく書くとApplication Domain。  マネージプロセスが必ず一つ持ち、多く作れ ます。  最初の一つ以外いつでも削除できます。  いくつかの例外を除いて、ドメインごとにアセ ンブリを管理します。  作ったAppDomainを削除すると、ドメイン内 で呼び出しているアセンブリも一緒にアンロー ドされます。
  • 5. AppDomain #1(既定) AppDomain #2 Hoo.exe Bar1.dll ローダーヒープ ローダーヒープ Bar1.dll Bar2.dll System.dll System.dll ドメイン中立アセンブリ ローダーヒープ MSCorLib.dll 必要に応じてAppDomainを作成 (普通は既定の一つでいい 名前は自分で考えよう) .NET Framework 4 MSCorEE.DLL / CLR.DLL MSCorEEi.DLL (shim) .NET Framework 2.0/3.0/3.5 MSCorWks.DLL
  • 6. AppDomain.Unload (AppDomain.CurrentDomain); で終わらせようとするとどうなる? CannotAppDomainUnloadExceptionが スローされる (ま、普通やりませんよね)
  • 8.
  • 9.  1000個のAppDomain作成/消去 (ドメイン固有のアセンブリ呼び出しはなし)  作成はあまり時間かからないが、消去は結構 かかっている  Loader Heap, Working Set, Private bytesはAppDomainを消去してもそれなりに。  Loader Heapは適当なところでGCが発生
  • 10. http://support.microsoft.com/kb/979744/j a (パッチあり) .NET Framework 2.0 ベースの Multi- AppDomain アプリケーションを実行したと きにアプリケーションが応答しなくなる
  • 11.
  • 13.  All-In-One-Code-Frameworkにある CppHostCLRというソリューションがサンプル http://1code.codeplex.com/  ICorRuntimeHost, ICLRRuntimeHostを使 用したサンプル。ただし、どちらもCLR2以降し かロードできない (今更.NET 1.1のホスティングいらないよね?)
  • 14.
  • 16.  CLRの開始まではそんなに難しくない  アンマネージドからマネージのインスタンスメ ソッドを呼び出そうとすると結構大変。  staticメソッド呼ぶだけなら ICLRRuntimeHost-> ExecuteInDefaultAppDomain()でOK  お仕事であるいは趣味で「.NETのこのクラスラ イブラリ使いたい」と思ったときはどうぞ
  • 17.  Internet Explorer  IIS  IIS6まではWorker ProcessがCLRをホストして いました。  IIS7以降の統合モードではIIS自身がホストしま す。クラッシックモードではWorker Processが使 われます。  SQL Server 2005以降(SQLCLRがある)。  PowerShell
  • 18.  たぶん99.9%の人は複数ドメイン作らなくても やっていけます。昔はプラグインのために使う こともありましたが、今はMEFがありますし。  そして、CLRのホストは99.999%くらいの人は 知らなくてもやっていけるかと思います。  ここもMCPの試験範囲なので出ますよ。 2nd時代にこの本だけ読んでMCP受けました。
  • 19. プログラミング.NET Framework 第二版  プログラミング.NET Framework 第三版  Root of .NET Framework  MSDN Library(ホストの概要) http://msdn.microsoft.com/ja- jp/library/dd380850.aspx  MSDN Library(アプリケーションドメイン) http://msdn.microsoft.com/ja- jp/library/2bh4z9hs.aspx