This documentation is archived and is not being maintained.

My.Application.Info.WorkingSet Property

Gets the amount of physical memory mapped to the process context.

' Usage
Dim value As Long = My.Application.Info.WorkingSet
' Declaration
Public ReadOnly Property WorkingSet As Long

A Long that contains the number of bytes of physical memory mapped to the process context.

The following condition can cause an exception:

  • A situation in which partial trust exists and the user lacks necessary permissions (SecurityException).

The My.Application.Info.WorkingSet property has the same behavior as the WorkingSet property.

NoteNote:

This property always returns zero for Windows 98 and Windows Millennium Edition.

This example uses the My.Application.Info.WorkingSet property to display the number of bytes of physical memory mapped to the application.

MsgBox("Application working set: " & My.Application.Info.WorkingSet)

Namespace: Microsoft.VisualBasic.ApplicationServices

Class: AssemblyInfo

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

Availability by Project Type

Project type

Available

Windows Application

Yes

Class Library

Yes

Console Application

Yes

Windows Control Library

Yes

Web Control Library

No

Windows Service

Yes

Web Site

No

The following permission may be required:

Permission

Description

EnvironmentPermission

Controls the ability to access all environment variables. Associated enumeration: Unrestricted.

For more information, see Code Access Security and Requesting Permissions.

Show: