## jmunit.framework.cldc11
Class MemoryMeasurement

    java.lang.Object
      jmunit.framework.cldc11.MemoryMeasurement

All Implemented Interfaces:
  PerformanceMeasurement

    public class MemoryMeasurement

extends java.lang.Object
implements PerformanceMeasurement

The MemoryMeasurement class monitors how much memory is used by a test.

Since:
  JMUnit 1.2
Author:
  C.A. Meijer

Constructor Summary
`MemoryMeasurement(long maxMemory)` Constructor.
`MemoryMeasurement(long maxMemory, boolean runGarbageCollector)`

Method Summary
`void` `endMeasurement()` Ends monitoring.
`void` `startMeasurement()` Starts monitoring.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MemoryMeasurement

    public MemoryMeasurement(long maxMemory)

  Constructor.

  Parameters:
    `maxMemory` - The maximum number of bytes that the test may put on the heap.

### MemoryMeasurement

    public MemoryMeasurement(long maxMemory,
                             boolean runGarbageCollector)

Parameters:
  `maxMemory` - The maximum number of bytes that the test may put on the heap.
  `runGarbageCollector` - If true the GC is run before and after a test starts.

Method Detail

### startMeasurement

    public void startMeasurement()

  Starts monitoring.

  Specified by:
    `startMeasurement` in interface `PerformanceMeasurement`

### endMeasurement

    public void endMeasurement()

  Ends monitoring.

  Specified by:
    `endMeasurement` in interface `PerformanceMeasurement`