Splitter: 全局限制内存使用量,防止内存溢出

This commit is contained in:
ziyue
2021-11-19 11:27:27 +08:00
parent 0281cb6a11
commit b13a0f5b79
2 changed files with 7 additions and 5 deletions

View File

@@ -71,11 +71,6 @@ const char *PSDecoder::onSearchPacketTail(const char *data, size_t len) {
InfoL << "解析 ps 异常: bytes=" << len
<< ", exception=" << ex.what()
<< ", hex=" << hexdump(data, MIN(len, 32));
if (remainDataSize() > 256 * 1024) {
//缓存太多数据无法处理则上抛异常
throw;
}
return nullptr;
}
}