private int gc0() {
		synchronized (objectCache) {
			if (!opened) {
				throw new StorageError(StorageError.STORAGE_NOT_OPENED);
			}

			if (gcDone || gcActive) {
				return 0;
			}

			gcActive = true;

			if (backgroundGc) {
				if (gcThread == null) {
					gcThread = new GcThread();
				}

				gcThread.activate();
				return 0;
			}
			// System.out.println("Start GC, allocatedDelta=" + allocatedDelta +
			// ", header[" + currIndex + "].size=" + header.root[currIndex].size
			// + ", gcTreshold=" + gcThreshold);

			mark();

			return sweep();
		}
	}