xinyiZzz commented on code in PR #19795:
URL: https://github.com/apache/doris/pull/19795#discussion_r1198599076
##########
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:
Now in #ifndef __APPLE__
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]