public synchronized void registerCustomAllocator(Class cls,
			CustomAllocator allocator) {
		synchronized (objectCache) {
			ClassDescriptor desc = getClassDescriptor(cls);
			desc.allocator = allocator;
			storeObject0(desc, false);

			if (customAllocatorMap == null) {
				customAllocatorMap = new HashMap();
				customAllocatorList = new ArrayList();
			}

			customAllocatorMap.put(cls, allocator);
			customAllocatorList.add(allocator);
			reserveLocation(allocator.getSegmentBase(),
					allocator.getSegmentSize());
		}
	}