I am trying to allocate memory NSImage*originalLocationImage;
NSURL *fileURL = [NSURL fileURLWithPath:originalLocation]; //originalLocation is file path in my disk
originalLocationImage = [[NSImage alloc]initByReferencingURL:fileURL];
NSBitmapImageRep *sourceRep = [[NSBitmapImageRep alloc]initWithData:[SourceImage TIFFRepresentation]] //this line fails to allocate memory
and it fails for large Images/
and throws error
malloc: *** mmap(size=268435456) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
for small images it works properly.
any help??