JanosVM v1.0 API

edu.utah.janosvm.resources
Class MemorySpec

java.lang.Object
  |
  +--edu.utah.janosvm.resources.ResourceSpec
        |
        +--edu.utah.janosvm.resources.MemorySpec
All Implemented Interfaces:
java.lang.Cloneable

public final class MemorySpec
extends ResourceSpec
implements java.lang.Cloneable

Specification for memory resources. There are currently two details in a memory specification: the amount of memory and the policy for the GC. The amount of memory is specified in bytes, but will be rounded to the GC's internal page granularity.

Author:
Tim Stack, Utah Janos Team

Fields inherited from class edu.utah.janosvm.resources.ResourceSpec
found
 
Constructor Summary
MemorySpec(int max)
          Construct a memory resource specification that requires the given amount of memory.
MemorySpec(int max, java.lang.String policyClass)
          Construct a memory resource specification that requires the given amount of memory and needs the given GCPolicy class to be used.
 
Method Summary
 java.lang.Object clone()
           
static MemorySpec current()
           
static MemorySpec defaultSpec()
           
 boolean equals(java.lang.Object obj)
           
protected  void finalize()
           
 int getMax()
           
 java.lang.String getPolicyClass()
           
private  void nativeConstructor(int max, java.lang.String policyClass)
          Constructs the native part of the class.
private  void nativeFinalizer()
           
 java.lang.String toString()
           
 
Methods inherited from class edu.utah.janosvm.resources.ResourceSpec
find, nativeFind
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0
 

Constructor Detail

MemorySpec

public MemorySpec(int max,
                  java.lang.String policyClass)
Construct a memory resource specification that requires the given amount of memory and needs the given GCPolicy class to be used.
Parameters:
max - The amount of memory, in bytes, required for the team to run.
policyClass - The name of the policy class the new team should use when initializing the GC.

MemorySpec

public MemorySpec(int max)
Construct a memory resource specification that requires the given amount of memory.
Parameters:
max - The amount of memory, in bytes, required for the team to run.
Method Detail

nativeConstructor

private void nativeConstructor(int max,
                               java.lang.String policyClass)
Constructs the native part of the class.

getMax

public int getMax()
Returns:
The maximum amount of memory, in bytes, as stored in the spec.

getPolicyClass

public java.lang.String getPolicyClass()
Returns:
The name of the policy class as stored in the spec.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

nativeFinalizer

private void nativeFinalizer()

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

current

public static MemorySpec current()
Returns:
A MemorySpec describing the current team's memory requirements.

defaultSpec

public static MemorySpec defaultSpec()
Returns:
A MemorySpec with the default values.

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