Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
#include <string>
#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:"<<endl;
Expand Down Expand Up @@ -38,5 +53,9 @@ int main()

cout <<"Result is:"<<endl<<c.data()<<endl;

big_data_int value(10);
big_data_int divisor(0);
value % divisor;

return 0;
}