Home
last modified time | relevance | path

Searched refs:newPtr (Results 1 – 8 of 8) sorted by relevance

/kernel/liteos_m/testsuites/sample/kernel/lms/
DIt_los_lms_010.c44 CHAR *newPtr = LOS_MemRealloc(g_testLmsPool, str, 0x8+0x2); /* reaSize 0x2 is not 4Align */ in TestCase() local
45 ICUNIT_GOTO_NOT_EQUAL(newPtr, NULL, newPtr, EXIT); in TestCase()
46 PRINT_DEBUG("newPtr = 0x%x,%d\n", newPtr, __LINE__); in TestCase()
48 PRINTK("0x%x\n", newPtr[0x8+0x3]); /* not trigger overflow at newPtr[0x3] */ in TestCase()
51 newPtr[0x8+0x4] = 0x01; /* write 0x1,trigger overflow at newPtr[0x4] */ in TestCase()
54 PRINTK("0x%x\n", newPtr[0x8+0x4]); /* trigger read overflow at newPtr[0x4] */ in TestCase()
56 backStr = (CHAR *)(newPtr - 1); /* Add offset -1 */ in TestCase()
64 PRINTK("0x%x\n", newPtr[0x8+0x5]); /* trigger overflow at newPtr[0x5] */ in TestCase()
66 (VOID)LOS_MemFree(g_testLmsPool, newPtr); in TestCase()
DIt_los_lms_009.c54 CHAR *newPtr = LOS_MemRealloc(g_testLmsPool, str, size * 6); /* mem size * 6 */ in TestCase() local
55 ICUNIT_GOTO_NOT_EQUAL(newPtr, NULL, newPtr, EXIT2); in TestCase()
56 PRINT_DEBUG("newPtr = 0x%x,%d\n", newPtr, __LINE__); in TestCase()
57 PRINTK("0x%x\n", newPtr[size * 6]); /* trigger overflow at size * 6 */ in TestCase()
60 (VOID)LOS_MemFree(g_testLmsPool, newPtr); in TestCase()
DIt_los_lms_008.c54 CHAR *newPtr = LOS_MemRealloc(g_testLmsPool, str, size * 4 + 8); /* mem size * 4 - 8 */ in TestCase() local
55 ICUNIT_GOTO_NOT_EQUAL(newPtr, NULL, newPtr, EXIT2); in TestCase()
56 PRINT_DEBUG("newPtr = 0x%x,%d\n", newPtr, __LINE__); in TestCase()
57 PRINTK("0x%x\n", newPtr[size * 4 + 8]); /* trigger read overflow at size * 4 - 8 */ in TestCase()
60 (VOID)LOS_MemFree(g_testLmsPool, newPtr); in TestCase()
DIt_los_lms_006.c45 CHAR *newPtr = LOS_MemRealloc(g_testLmsPool, str, size - 32); /* mem size - 32 */ in TestCase() local
46 ICUNIT_GOTO_NOT_EQUAL(newPtr, NULL, newPtr, EXIT); in TestCase()
48 PRINTK("newPtr = 0x%x\n", newPtr[size - 30]); /* trigger read overflow at size - 30 */ in TestCase()
49 (VOID)LOS_MemFree(g_testLmsPool, newPtr); in TestCase()
DIt_los_lms_005.c45 CHAR *newPtr = LOS_MemRealloc(g_testLmsPool, str, size - 4); /* mem size - 4 */ in TestCase() local
46 ICUNIT_GOTO_NOT_EQUAL(newPtr, NULL, newPtr, EXIT); in TestCase()
48 PRINTK("newPtr = 0x%x\n", newPtr[size - 4]); /* trigger read overflow at size - 4 */ in TestCase()
49 (VOID)LOS_MemFree(g_testLmsPool, newPtr); in TestCase()
DIt_los_lms_007.c54 CHAR *newPtr = LOS_MemRealloc(g_testLmsPool, str, size * 2); /* mem size * 2 */ in TestCase() local
55 ICUNIT_GOTO_NOT_EQUAL(newPtr, NULL, newPtr, EXIT2); in TestCase()
57 PRINTK("0x%x\n", newPtr[size * 2]); /* trigger read overflow at size * 2 */ in TestCase()
60 (VOID)LOS_MemFree(g_testLmsPool, newPtr); in TestCase()
/kernel/liteos_a/kernel/base/mem/tlsf/
Dlos_memory.c1471 VOID *newPtr = NULL; in LOS_MemRealloc() local
1486 newPtr = OsMemRealloc(pool, ptr, node, size, intSave); in LOS_MemRealloc()
1490 return newPtr; in LOS_MemRealloc()
/kernel/liteos_m/kernel/src/mm/
Dlos_memory.c1501 VOID *newPtr = NULL; local
1516 newPtr = OsMemRealloc(pool, ptr, node, size, intSave);
1520 return newPtr;