fixed memory allocation checks. changed types for DfsStackEntry to long to support both 32bit and 64bit indexing schemes as fused types are not allowed in structs