From 37c13d8f60b0658dcd889fceb5344618e355a8a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=91=E5=B1=91=E5=B1=91?= Date: Fri, 12 Sep 2025 10:26:38 +0800 Subject: [PATCH] add leak type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 屑屑屑 --- frameworks/innerkitsimpl/common/src/pixel_map.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frameworks/innerkitsimpl/common/src/pixel_map.cpp b/frameworks/innerkitsimpl/common/src/pixel_map.cpp index fe66140a1..f99f41753 100644 --- a/frameworks/innerkitsimpl/common/src/pixel_map.cpp +++ b/frameworks/innerkitsimpl/common/src/pixel_map.cpp @@ -93,6 +93,7 @@ extern "C" { #define BUF_NAME_LEN 255 #define PREFIX_NAME_LEN 11 +#define DMA_BUF_SET_LEAK_TYPE _IOW(DMA_BUF_BASE, 5, const char *) namespace OHOS { namespace Media { @@ -561,6 +562,10 @@ uint32_t PixelMap::SetMemoryName(const std::string &pixelMapName) if (ret != 0) { return ERR_MEMORY_NOT_SUPPORT; } + ret = TEMP_FAILURE_RETRY(ioctl(fd, DMA_BUF_SET_LEAK_TYPE, "pixelmap")); + if (ret != 0) { + IMAGE_LOGD("[PixelMap] set dma buf leak type failed"); + } return SUCCESS; } -- Gitee