harpoon.Backend.Runtime1
Class MallocAllocationStrategy
java.lang.Object
harpoon.Backend.Runtime1.AllocationStrategy
harpoon.Backend.Runtime1.MallocAllocationStrategy
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- BDWAllocationStrategy, HeapStatsAllocationStrategy, InstrumentedAllocationStrategy, NiftyAllocationStrategy, RealtimeAllocationStrategy, SPAllocationStrategy
public class MallocAllocationStrategy
- extends AllocationStrategy
MallocAllocationStrategy
calls a C function with the
same prototype as malloc()
to do the allocation.
- Version:
- $Id: MallocAllocationStrategy.java,v 1.2 2002/02/25 21:02:20 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
- See Also:
- Serialized Form
Method Summary |
protected Exp |
buildAllocCall(TreeFactory tf,
HCodeElement source,
DerivationGenerator dg,
AllocationInformation.AllocationProperties ap,
String funcname,
Exp length,
ExpList addlArgs)
|
protected static Exp |
DECLARE(DerivationGenerator dg,
HClass hc,
Exp exp)
|
protected static Exp |
DECLARE(DerivationGenerator dg,
HClass hc,
Temp t,
Exp exp)
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
frame
protected final Frame frame
MallocAllocationStrategy
public MallocAllocationStrategy(Frame f,
String funcname)
- Creates a
MallocAllocationStrategy
.
- Parameters:
funcname
- The name of the C function to call to do the allocation.
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.
- Specified by:
memAlloc
in class AllocationStrategy
buildAllocCall
protected Exp buildAllocCall(TreeFactory tf,
HCodeElement source,
DerivationGenerator dg,
AllocationInformation.AllocationProperties ap,
String funcname,
Exp length,
ExpList addlArgs)
DECLARE
protected static Exp DECLARE(DerivationGenerator dg,
HClass hc,
Exp exp)
DECLARE
protected static Exp DECLARE(DerivationGenerator dg,
HClass hc,
Temp t,
Exp exp)