yiguolei commented on code in PR #19795: URL: https://github.com/apache/doris/pull/19795#discussion_r1198435021
########## be/src/util/mem_info.cpp: ########## @@ -300,13 +300,28 @@ void MemInfo::init() { _s_sys_mem_available_warning_water_mark = _s_sys_mem_available_low_water_mark + p1; } + // Expect vm overcommit memory value to be 1, system will no longer throw bad_alloc, memory alloc are always accepted, + // memory limit check is handed over to Doris Allocator, make sure throw exception position is controllable, + // otherwise bad_alloc can be thrown anywhere and it will be difficult to achieve exception safety. + std::ifstream sys_vm("/proc/sys/vm/overcommit_memory", std::ios::in); Review Comment: Add #if os_linux macro to do this check only in linux not macos. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org