File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 13
13
int main (int argc, char * argv[])
14
14
{
15
15
int callocSize = 100 ;
16
- int n = 1000 ;
16
+ int n = 100 ;
17
17
char * callocPtrs[n];
18
18
char * mmapPtrs[n];
19
19
int mmapLen = 20 ;
20
20
21
21
// Use calloc to allocate lots of smaller memory regions
22
- for (int i = 0 ; i < 1000 ; i++) {
22
+ for (int i = 0 ; i < n ; i++) {
23
23
char * callocPtr = (char *)calloc (1 , callocSize);
24
24
std::string s = " number " ;
25
25
s += std::to_string (i);
@@ -38,7 +38,7 @@ int main(int argc, char* argv[])
38
38
}
39
39
40
40
// Go back through and check everything is still intact
41
- for (int j = 0 ; j < 1000 ; j++) {
41
+ for (int j = 0 ; j < n ; j++) {
42
42
char * nextPtr = callocPtrs[j];
43
43
std::string actual (nextPtr);
44
44
std::string expected = " number " ;
You can’t perform that action at this time.
0 commit comments