public static int pickAllocator(VM_Type type, VM_Method method) throws InterruptiblePragma {  if (method != null) {  VM_Class cls = method.getDeclaringClass(); byte[] clsBA = cls.getDescriptor().toByteArray(); if (SelectedPlanConstraints.get().withGCspy()) { if (isPrefix("Lorg/mmtk/vm/gcspy/",  clsBA) || isPrefix("[Lorg/mmtk/vm/gcspy/", clsBA)) { return Plan.ALLOC_GCSPY; } } if (isPrefix("Lorg/mmtk/", clsBA) || isPrefix("Lcom/ibm/jikesrvm/mm/", clsBA) || isPrefix("Lcom/ibm/jikesrvm/memorymanagers/mminterface/VM_GCMapIteratorGroup", clsBA)) { return Plan.ALLOC_IMMORTAL; } } MMType t = (MMType) type.getMMType(); return t.getAllocator();
public static int pickAllocator(VM_Type type) throws InterruptiblePragma { return pickAllocator(type, null);
  public static int pickAllocator(VM_Type type, VM_Method method)    throws InterruptiblePragma {    if (method != null) {     // We should strive to be allocation-free here.      VM_Class cls = method.getDeclaringClass();      byte[] clsBA = cls.getDescriptor().toByteArray();      if (SelectedPlanConstraints.get().withGCspy()) {        if (isPrefix("Lorg/mmtk/vm/gcspy/",  clsBA) ||            isPrefix("[Lorg/mmtk/vm/gcspy/", clsBA)) {          return Plan.ALLOC_GCSPY;        }      }      if (isPrefix("Lorg/mmtk/", clsBA) ||          isPrefix("Lcom/ibm/jikesrvm/mm/", clsBA) ||          isPrefix("Lcom/ibm/jikesrvm/memorymanagers/mminterface/VM_GCMapIteratorGroup", clsBA)) {        return Plan.ALLOC_IMMORTAL;      }    }    MMType t = (MMType) type.getMMType();    return t.getAllocator();  }