Add an Error string specifically for when we hit an ENOMEM when

trying to mmap a file fails so parent caller function can 
provide helpful information to use about what went wrong.

llvm-svn: 155617
This commit is contained in:
Jason Molenda
2012-04-26 06:39:51 +00:00
parent 739ef80fd7
commit fc6a17b0a8

View File

@@ -207,6 +207,10 @@ DataBufferMemoryMap::MemoryMapFromFileDescriptor (int fd,
}
}
}
if (error.GetError() == ENOMEM)
{
error.SetErrorStringWithFormat("could not allocate %lld bytes of memory to mmap in file", (uint64_t) length);
}
}
else
{