告警信息清理

Signed-off-by: 张晟钰 <zhangshengyu5@huawei.com>
This commit is contained in:
HarmmerDing 2024-04-11 17:40:19 +08:00 committed by 张晟钰
parent df60013104
commit 01dde22a5f
2 changed files with 4 additions and 4 deletions

View File

@ -23,8 +23,8 @@
namespace OHOS {
namespace FileAccessFwk {
const int64_t FILEFILTER_DEFAULT_COUNTS = 2000;
const int64_t FILEFILTER_MAX_COUNTS = 20000;
const uint64_t FILEFILTER_DEFAULT_COUNTS = 2000;
const uint64_t FILEFILTER_MAX_COUNTS = 20000;
std::shared_ptr<FileAccessExtAbility> FileAccessExtStubImpl::GetOwner()
{
return extension_;
@ -149,7 +149,7 @@ int FileAccessExtStubImpl::ListFile(const FileInfo &fileInfo, const int64_t offs
memInfo.isOver = false;
int64_t currentOffset = offset;
while (true) {
int64_t maxCounts =
uint64_t maxCounts =
memInfo.memSize > DEFAULT_CAPACITY_200KB ? FILEFILTER_MAX_COUNTS : FILEFILTER_DEFAULT_COUNTS;
fileInfoVec.clear();
ret = extension_->ListFile(fileInfo, currentOffset, maxCounts, filter, fileInfoVec);

View File

@ -211,7 +211,7 @@ public:
static bool CalculateMemSize(uint64_t &memSize, SharedMemoryInfo &memInfo)
{
uint64_t allocSize = ((memInfo.leftDataCounts + memInfo.totalDataCounts - 1) / memInfo.totalDataCounts + 1)
int64_t allocSize = ((memInfo.leftDataCounts + memInfo.totalDataCounts - 1) / memInfo.totalDataCounts + 1)
* DEFAULT_CAPACITY_200KB;
if (allocSize >= MAX_CAPACITY_2MB && memInfo.memSize < MAX_CAPACITY_2MB) {