Share via


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

Return Value

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

Exceptions

The following condition can cause an exception:

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

Remarks

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

Note

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

Example

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)

Requirements

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

Permissions

The following permission may be necessary:

Permission Description

EnvironmentPermission

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

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

See Also

Reference

My.Application.Info Object
WorkingSet
Microsoft.VisualBasic.ApplicationServices.AssemblyInfo.WorkingSet