标签: c++ linux memory linux-kernel high-availability
例如rpc处理功能:
void Process(const Request& req, Response* resp) { struct mallinfo mi; mi = mallinfo(); if (mi.uordblks + mi.hblkhd > MemoryUseThreshold) { resp.code = kOverLoad; return; } // normal process }