helper.unsafeSetObjectFlags(result, ObjectFlags.GC_DEFAULT_COLOR);
	protected Object allocObject(VmClassType vmClass, int size) {		if (size > DEFAULT_HEAP_SIZE) {			throw new OutOfMemoryError("Object too large (" + size + ")");		}		if (gcActive) {		    Unsafe.debug("allocObject(");		    Unsafe.debug(vmClass.getName());		    Unsafe.debug(", ");		    Unsafe.debug(size);		    Unsafe.debug(");");            Unsafe.getCurrentProcessor().getArchitecture().getStackReader()            .debugStackTrace();		    helper.die("allocObject during GC");		}			// Make sure the class is initialized		vmClass.initialize();				final int alignedSize = ObjectLayout.objectAlign(size);		//final Monitor mon = heapMonitor;		VmAbstractHeap heap = currentHeap;		Object result = null;		int oomCount = 0;		final Monitor m = heapMonitor;		//final Monitor m = null;		if (m != null) {			m.enter();		}		try {			while (result == null) {				// The current heap is full				if (heap == null) {					//Unsafe.debug("allocHeap in allocObject("); Unsafe.debug(alignedSize);					//Unsafe.debug(") ");					if ((heap = allocHeap(DEFAULT_HEAP_SIZE)) == null) {						lowOnMemory = true;						// It was not possible to allocate another heap.						// First try to GC, if we've done that before						// in this allocation, then we're in real panic.						if (oomCount == 0) {							oomCount++;							Unsafe.debug("<oom/>");							gc();							heap = firstHeap;							currentHeap = firstHeap;						} else {							Unsafe.debug("Out of memory in allocObject(");							Unsafe.debug(size);							Unsafe.debug(")");							throw OOME;							//Unsafe.die();						}					} else {						//Unsafe.debug("AO.G");						// We successfully allocated a new heap, set it						// to current, so we'll use it for the following						// allocations.						currentHeap = heap;					}				}				result = heap.alloc(vmClass, alignedSize);				if (result == null) {					heap = heap.getNext();				}			}			vmClass.incInstanceCount();			lowOnMemory = false;			// Allocated objects are initially black.			helper.unsafeSetObjectFlags(result, ObjectFlags.GC_DEFAULT_COLOR);			allocatedSinceGcTrigger += alignedSize;			if ((allocatedSinceGcTrigger > triggerSize) && (gcThread != null)) {			    Unsafe.debug("<alloc:GC trigger/>");			    allocatedSinceGcTrigger = 0;			    gcThread.trigger(/*false*/true);				currentHeap = firstHeap;			}		} finally {			if (m != null) {				m.exit();			}		}		//Unsafe.debug("new="); Unsafe.debug(Unsafe.addressToInt(Unsafe.addressOf(result)));				return result;	}