JanosVM v1.0 API

edu.utah.janosvm.resources
Class MemoryResource

java.lang.Object
  |
  +--edu.utah.janosvm.resources.MemoryResource

public final class MemoryResource
extends java.lang.Object

Provides java level access to the current team's memory resource.

Author:
Tim Stack, Utah Janos Team

Constructor Summary
private MemoryResource()
          Its a static only class.
 
Method Summary
static long getMax()
           
static long getPeakUsage()
           
static long getUsage()
           
static void registerLeak(java.lang.Object obj)
          Register an object suspected to be a leak.
(package private) static long sizeof(java.lang.Object obj)
           
static void unregisterLeak(java.lang.Object obj)
          Unregister an object suspected to be a leak.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait, wait0
 

Constructor Detail

MemoryResource

private MemoryResource()
Its a static only class.
Method Detail

getUsage

public static long getUsage()
Returns:
The memory usage, in bytes, for the current team.

getPeakUsage

public static long getPeakUsage()
Returns:
The peak usage, in bytes, for the current team.

getMax

public static long getMax()
Returns:
The maximum allowed memory, in bytes, for this team.

sizeof

static long sizeof(java.lang.Object obj)
Parameters:
obj - An object to get the size of.
Returns:
The number of bytes occupied by the given object.

registerLeak

public static void registerLeak(java.lang.Object obj)
Register an object suspected to be a leak.

unregisterLeak

public static void unregisterLeak(java.lang.Object obj)
Unregister an object suspected to be a leak.

JanosVM v1.0 API

This documentation is Copyright (C) 2000-2003 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions.
Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/
Generated on Feb 13, 2003