Process.WorkingSet プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Process.WorkingSet プロパティの意味・解説 

Process.WorkingSet プロパティ

メモ : このプロパティは、互換性のために残されています。

関連付けられたプロセスの物理メモリ使用量を取得します。

名前空間: System.Diagnostics
アセンブリ: System (system.dll 内)
構文構文

<ObsoleteAttribute("This property has been deprecated.  Please
 use System.Diagnostics.Process.WorkingSet64 instead.  http://go.microsoft.com/fwlink/?linkid=14202")>
 _
Public ReadOnly Property
 WorkingSet As Integer
[ObsoleteAttribute("This property has been deprecated.  Please use System.Diagnostics.Process.WorkingSet64
 instead.  http://go.microsoft.com/fwlink/?linkid=14202")] 
public int WorkingSet { get;
 }
[ObsoleteAttribute(L"This property has been deprecated.  Please use System.Diagnostics.Process.WorkingSet64
 instead.  http://go.microsoft.com/fwlink/?linkid=14202")] 
public:
property int WorkingSet {
    int get ();
}
/** @property */
public int get_WorkingSet ()

プロパティ値
関連付けられたプロセスが使用している物理メモリの合計容量 (バイト単位)。

例外例外
例外の種類条件

PlatformNotSupportedException

プラットフォームが Windows 98 または Windows Millennium Edition (Windows Me) です。このプロパティはサポートされません。

解説解説
使用例使用例

メモ帳のインスタンスを起動する例を次に示します。この例では、インスタンスの起動後、関連付けられているプロセスのさまざまなプロパティが取得および表示されます。その後、プロセスの終了を検知し、プロセスの終了コードを表示します。

Imports System
Imports System.Diagnostics
Imports System.Threading

Namespace Process_Sample
   Class MyProcessClass

      Public Shared Sub
 Main()
         Try

            Dim myProcess As Process
            myProcess = Process.Start("NotePad.exe")

            While Not myProcess.HasExited

               Console.WriteLine()
               
               ' Get physical memory usage of the associated process.
               Console.WriteLine("Process's physical memory usage:
 " + _
                                      myProcess.WorkingSet.ToString)
               ' Get base priority of the associated process.
               Console.WriteLine("Base priority of the associated
 process: " + _
                                      myProcess.BasePriority.ToString)
               ' Get priority class of the associated process.
               Console.WriteLine("Priority class of the associated
 process: " + _
                                      myProcess.PriorityClass.ToString)
               ' Get user processor time for this process.
               Console.WriteLine("User Processor Time: "
 + _
                                      myProcess.UserProcessorTime.ToString)
               ' Get privileged processor time for this process.
               Console.WriteLine("Privileged Processor Time: "
 + _
                                   myProcess.PrivilegedProcessorTime.ToString)
               ' Get total processor time for this process.
               Console.WriteLine("Total Processor Time: "
 + _
                                     myProcess.TotalProcessorTime.ToString)
               ' Invoke overloaded ToString function.
               Console.WriteLine("Process's Name: " + myProcess.ToString)
               Console.WriteLine("-------------------------------------")

               If myProcess.Responding Then
                  Console.WriteLine("Status:  Responding to user
 interface")
                  myProcess.Refresh()
               Else
                  Console.WriteLine("Status:  Not Responding")
               End If
               Thread.Sleep(1000)
            End While

            Console.WriteLine()
            Console.WriteLine("Process exit code: {0}",
 myProcess.ExitCode)

         Catch e As Exception
            Console.WriteLine("The following exception was raised:
 " + e.Message)
         End Try
      End Sub 'Main
   End Class 'MyProcessClass
End Namespace 'Process_Sample

using System;
using System.Diagnostics;
using System.Threading;

namespace Process_Sample
{
   class MyProcessClass
   {
      public static void
 Main()
      {
         try
         {

            Process myProcess;
            myProcess = Process.Start("NotePad.exe");

            while(!myProcess.HasExited)
            {
               Console.WriteLine();

               // Get physical memory usage of the associated process.
               Console.WriteLine("Process's physical memory usage: " +
 myProcess.WorkingSet);
               // Get base priority of the associated process.
               Console.WriteLine("Base priority of the associated process: "
 + myProcess.BasePriority);
               // Get priority class of the associated process.
               Console.WriteLine("Priority class of the associated
 process: " + myProcess.PriorityClass);
               // Get user processor time for this process.
               Console.WriteLine("User Processor Time: " + myProcess.UserProcessorTime);
               // Get privileged processor time for this process.
               Console.WriteLine("Privileged Processor Time: " + myProcess.PrivilegedProcessorTime);
               // Get total processor time for this process.
               Console.WriteLine("Total Processor Time: " + myProcess.TotalProcessorTime);
               // Invoke overloaded ToString function.
               Console.WriteLine("Process's Name: " + myProcess.ToString());
               Console.WriteLine("-------------------------------------");

               if(myProcess.Responding)
               {
                  Console.WriteLine("Status:  Responding to user interface");
                  myProcess.Refresh();
               }
               else
               {
                  Console.WriteLine("Status:  Not Responding");
               }
               Thread.Sleep(1000);

            }

            Console.WriteLine();
            Console.WriteLine("Process exit code: {0}", myProcess.ExitCode);
         }
         catch(Exception e)
         {
            Console.WriteLine("The following exception was raised: " +
 e.Message);
         }
      }

   }
}
#using <System.dll>

using namespace System;
using namespace System::Diagnostics;
using namespace System::Threading;
int main()
{
   try
   {
      Process^ myProcess;
      myProcess = Process::Start( "NotePad.exe" );
      while (  !myProcess->HasExited )
      {
         Console::WriteLine();
         
         // Get physical memory usage of the associated process.
         Console::WriteLine( "Process's physical memory usage: {0}", myProcess->WorkingSet.ToString()
 );
         
         // Get base priority of the associated process.
         Console::WriteLine( "Base priority of the associated process: {0}",
 myProcess->BasePriority.ToString() );
         
         // Get priority class of the associated process.
         Console::WriteLine(  "Priority class of the associated
 process: {0}", myProcess->PriorityClass );
         
         // Get user processor time for this process.
         Console::WriteLine( "User Processor Time: {0}", myProcess->UserProcessorTime.ToString()
 );
         
         // Get privileged processor time for this process.
         Console::WriteLine( "Privileged Processor Time: {0}", myProcess->PrivilegedProcessorTime.ToString()
 );
         
         // Get total processor time for this process.
         Console::WriteLine( "Total Processor Time: {0}", myProcess->TotalProcessorTime.ToString()
 );
         
         // Invoke overloaded ToString function.
         Console::WriteLine( "Process's Name: {0}", myProcess->ToString()
 );
         Console::WriteLine( "-------------------------------------" );
         if ( myProcess->Responding )
         {
            Console::WriteLine( "Status:  Responding to user interface"
 );
            myProcess->Refresh();
         }
         else
         {
            Console::WriteLine( "Status:  Not Responding" );
         }
         Thread::Sleep( 1000 );
      }
      Console::WriteLine();
      Console::WriteLine(  "Process exit code: {0}", myProcess->ExitCode.ToString()
 );
   }
   catch ( Exception^ e ) 
   {
      Console::WriteLine( "The following exception was raised:  {0}", e->Message
 );
   }

}

.NET Framework のセキュリティ.NET Framework のセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Process クラス
Process メンバ
System.Diagnostics 名前空間
Process.MinWorkingSet プロパティ
Process.MaxWorkingSet プロパティ
Process.PeakWorkingSet プロパティ
Process.PeakWorkingSet64 プロパティ
WorkingSet64


このページでは「.NET Framework クラス ライブラリ リファレンス」からProcess.WorkingSet プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からProcess.WorkingSet プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からProcess.WorkingSet プロパティ を検索

英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

Process.WorkingSet プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Process.WorkingSet プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS