File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -99,11 +99,7 @@ int create_buffer(int64_t size) {
9999 file_template += " /plasmaXXXXXX" ;
100100 std::vector<char > file_name (file_template.begin (), file_template.end ());
101101 file_name.push_back (' \0 ' );
102- if (plasma::plasma_config->hugepages_enabled ) {
103- fd = open (&file_name[0 ], O_CREAT | O_RDWR, 0755 );
104- } else {
105- fd = mkstemp (&file_name[0 ]);
106- }
102+ fd = mkstemp (&file_name[0 ]);
107103 if (fd < 0 ) {
108104 ARROW_LOG (FATAL) << " create_buffer failed to open file " << &file_name[0 ];
109105 return -1 ;
@@ -145,6 +141,9 @@ void* fake_mmap(size_t size) {
145141#endif
146142 if (pointer == MAP_FAILED) {
147143 ARROW_LOG (ERROR) << " mmap failed with error: " << std::strerror (errno);
144+ if (errno == ENOMEM && plasma::plasma_config->hugepages_enabled ) {
145+ ARROW_LOG (ERROR) << " (this probably means you have to increase /proc/sys/vm/nr_hugepages)" ;
146+ }
148147 return pointer;
149148 }
150149
You can’t perform that action at this time.
0 commit comments