final long getPos(int oid) {
		synchronized (objectCache) {
			if (oid == 0 || oid >= currIndexSize) {
				throw new StorageError(StorageError.INVALID_OID);
			}

			if (multiclientSupport && !isInsideThreadTransaction()) {
				throw new StorageError(StorageError.NOT_IN_TRANSACTION);
			}

			Page pg = pool
					.getPage(header.root[1 - currIndex].index
							+ ((long) (oid >>> dbHandlesPerPageBits) << Page.pageSizeLog));
			long pos = Bytes.unpack8(pg.data,
					(oid & (dbHandlesPerPage - 1)) << 3);

			pool.unfix(pg);

			return pos;
		}
	}