Files
ray/thirdparty/patches/arrow-windows-dlmalloc.patch
T
mehrdadn 5fb5be0ba5 Some bug fixes for Windows (#7374)
* Fix MAP_SHARED check in sys/mman.h

* Fix missing :platform_shims dependency for ray_util

* dlmalloc patch for Arrow
2020-02-28 10:22:32 -08:00

17 lines
696 B
Diff

diff --git cpp/src/plasma/dlmalloc.cc cpp/src/plasma/dlmalloc.cc
--- cpp/src/plasma/dlmalloc.cc
+++ cpp/src/plasma/dlmalloc.cc
@@ -76,5 +76,8 @@ int create_buffer(int64_t size) {
- if (!CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE,
- (DWORD)((uint64_t)size >> (CHAR_BIT * sizeof(DWORD))),
- (DWORD)(uint64_t)size, NULL)) {
+ HANDLE h = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE,
+ (DWORD)((uint64_t)size >> (CHAR_BIT * sizeof(DWORD))),
+ (DWORD)(uint64_t)size, NULL);
+ if (h) {
+ fd = reinterpret_cast<int>(h);
+ } else {
fd = -1;
}
--