public static int pickAllocator(VM_Type type, VM_Method method) throws InterruptiblePragma {  if (type.isArrayType()) { if (isBaseCodeArrayAllocSite(method)) return Plan.ALLOC_COLD_CODE; else if (isOptCodeArrayAllocSite(method)) return Plan.ALLOC_HOT_CODE; }  if (method != null) {  VM_Class cls = method.getDeclaringClass(); byte[] clsBA = cls.getDescriptor().toByteArray(); byte[] methBA = method.getDescriptor().toByteArray(); if (Plan.WITH_GCSPY) { 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/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 {    /*     * We check the calling method so GC-data can go into special     * places.  A better implementation would be call-site specific     * which is strictly more refined.     */    if (type.isArrayType()) {      if (isBaseCodeArrayAllocSite(method))	return Plan.ALLOC_COLD_CODE;      else if (isOptCodeArrayAllocSite(method))	return Plan.ALLOC_HOT_CODE;    }    if (method != null) {     // We should strive to be allocation-free here.      VM_Class cls = method.getDeclaringClass();      byte[] clsBA = cls.getDescriptor().toByteArray();      byte[] methBA = method.getDescriptor().toByteArray();      if (Plan.WITH_GCSPY) {        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/memoryManagers/mmInterface/VM_GCMapIteratorGroup", clsBA)) {        return Plan.ALLOC_IMMORTAL;      }    }    MMType t = (MMType) type.getMMType();    return t.getAllocator();  }