mirror of
https://gitee.com/openharmony/filemanagement_user_file_service
synced 2024-11-23 15:29:42 +00:00
告警信息清理
Signed-off-by: 张晟钰 <zhangshengyu5@huawei.com>
This commit is contained in:
parent
df60013104
commit
01dde22a5f
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user