diff --git a/test.cpp b/test.cpp index f1266f1..b8ae38a 100644 --- a/test.cpp +++ b/test.cpp @@ -2,6 +2,21 @@ #include #include "big_data_int.h" +typedef unsigned long long size_t; +extern void *malloc(size_t); +int *alloc(unsigned count); + +void test44_1() { int *p = alloc(10); } // #nodefect#RESOURCE_LEAK + +int *alloc2(unsigned count) { + if (count >= 0) { + return (int *)malloc(count); + } + return 0; +} + +void MyFunc() { int *p = alloc2(10); } + int main() { cout<<"please input two numbers:"<