mirror of
https://gitee.com/openharmony/xts_hats
synced 2025-01-22 00:26:08 +00:00
修改kernel下编译问题
Signed-off-by: limeng151 <limeng151@huawei.com> Change-Id: Ib166d4c378e3b5fc8c73f6f7bad29a47c0605cc1
This commit is contained in:
parent
a146a3f1d2
commit
b2518f15d5
@ -216,7 +216,7 @@ HWTEST_F(MallocFreePerformance, freeperformance0100, Function | MediumTest | Lev
|
||||
for (int j = 0; j < CLUSTER_SIZE; ++j) {
|
||||
ptr[j] = malloc(g_sizes[index]);
|
||||
if (!ptr[j]) {
|
||||
printf("Malloc size of %u byte(s) failed: %s\n", g_sizes[index], strerror(errno));
|
||||
printf("Malloc size of %zu byte(s) failed: %s\n", g_sizes[index], strerror(errno));
|
||||
}
|
||||
++index;
|
||||
index %= SIZE_ARR_SIZE;
|
||||
|
@ -63,7 +63,7 @@ HWTEST_F(MallocPressure, pressureTest0100, Function | MediumTest | Level1)
|
||||
for (size_t size = 0; size < THRESHOLD; size += SIZE_ALIGN + 1) {
|
||||
void *ptr = malloc(size);
|
||||
if (!ptr) {
|
||||
printf("Malloc failed for size %u\n", size);
|
||||
printf("Malloc failed for size %zu\n", size);
|
||||
ASSERT_TRUE(true) << "malloc error = " << errno;
|
||||
}
|
||||
free(ptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user