메모리를 할당하려고합니다. NSImage * originalLocationImage;700MB ~ 800MB의 메모리를 할당하려고합니다. 이미지 크기
NSURL * fileURL = [NSURL fileURLWithPath : originalLocation]; // originalLocation은 내 디스크의 파일 경로입니다.
originalLocationImage = [[NSImage alloc] initByReferencingURL : fileURL];
NSBitmapImageRep *sourceRep = [[NSBitmapImageRep alloc]initWithData:[SourceImage TIFFRepresentation]] //this line fails to allocate memory
하고 큰 이미지 실패/
하고는 제대로 작동 작은 이미지에 대한 오류
malloc: *** mmap(size=268435456) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
가 발생합니다.
어떤 도움 ??
그 후 나는 그 이미지의 미리보기를 만들고 싶다. 그렇게하는 것이 더 좋은 방법 일 것이다. 나는 많은 것을 시도했지만 지금은 어떤 방법도 찾을 수 없었다. – ashish