harpoon.Backend.PreciseC
Class PGCNiftyAllocationStrategyWithStats

java.lang.Object
  |
  +--harpoon.Backend.Runtime1.AllocationStrategy
        |
        +--harpoon.Backend.Runtime1.MallocAllocationStrategy
              |
              +--harpoon.Backend.Runtime1.NiftyAllocationStrategy
                    |
                    +--harpoon.Backend.PreciseC.PGCNiftyAllocationStrategy
                          |
                          +--harpoon.Backend.PreciseC.PGCNiftyAllocationStrategyWithStats

public class PGCNiftyAllocationStrategyWithStats
extends PGCNiftyAllocationStrategy

PGCNiftyAllocationStrategyWithStats adds a callback to properly update statistics after stack allocation. This is pretty pointless, because you could just fake the stack allocation to get the statistics, but... Martin apparently wants it this way.

This code originally written by Brian; Scott rearranged it.

Version:
$Id: PGCNiftyAllocationStrategyWithStats.java,v 1.2 2002/02/25 21:02:09 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
, Brian Demsky <bdemsky@mit.edu>

Field Summary
 
Fields inherited from class harpoon.Backend.Runtime1.MallocAllocationStrategy
frame
 
Constructor Summary
PGCNiftyAllocationStrategyWithStats(Frame f)
          Creates a PGCNiftyAllocationStrategyWithStats.
 
Method Summary
 Exp memAlloc(TreeFactory tf, HCodeElement source, DerivationGenerator dg, AllocationInformation.AllocationProperties ap, Exp length)
          Return a Tree.Exp created with the given TreeFactory that returns a pointer to a piece of memory length bytes long.
 
Methods inherited from class harpoon.Backend.Runtime1.MallocAllocationStrategy
buildAllocCall, DECLARE, DECLARE
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PGCNiftyAllocationStrategyWithStats

public PGCNiftyAllocationStrategyWithStats(Frame f)
Creates a PGCNiftyAllocationStrategyWithStats.

Method Detail

memAlloc

public Exp memAlloc(TreeFactory tf,
                    HCodeElement source,
                    DerivationGenerator dg,
                    AllocationInformation.AllocationProperties ap,
                    Exp length)
Description copied from class: AllocationStrategy
Return a Tree.Exp created with the given TreeFactory that returns a pointer to a piece of memory length bytes long.

Overrides:
memAlloc in class PGCNiftyAllocationStrategy