Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-11-06 20:26:53 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-11-06 20:26:53 +0300
commitd52ddfa6ccc91a97562fc90fee3ef1f3eab774fd (patch)
tree2dd256d18bddafbae44febbfd0fa717f366dc569 /intern
parent7ef03eae20c8613f52b4cfca3919b9a871860f3e (diff)
parent64cd9a079b987e1ef3daf926bd5af26185e297a5 (diff)
Merge branch 'blender-v2.81-release'
Diffstat (limited to 'intern')
-rw-r--r--intern/guardedalloc/intern/mmap_win.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/intern/guardedalloc/intern/mmap_win.c b/intern/guardedalloc/intern/mmap_win.c
index 5b0c4b6614a..3508ae4e1aa 100644
--- a/intern/guardedalloc/intern/mmap_win.c
+++ b/intern/guardedalloc/intern/mmap_win.c
@@ -125,8 +125,11 @@ void *mmap(void *UNUSED(start), size_t len, int prot, int flags, int fd, off_t o
}
}
- /* note len is passed to a 32 bit DWORD, so can't be > 4 GB */
- maphandle = CreateFileMapping(fhandle, NULL, prot_flags, 0, len, NULL);
+ /* Split 64 bit size into low and high bits. */
+ DWORD len_bits_high = len >> 32;
+ DWORD len_bits_low = len & 0xFFFFFFFF;
+
+ maphandle = CreateFileMapping(fhandle, NULL, prot_flags, len_bits_high, len_bits_low, NULL);
if (maphandle == 0) {
errno = EBADF;
return MAP_FAILED;