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 1313int main (int argc, char * argv[])
1414{
1515 int callocSize = 100 ;
16- int n = 1000 ;
16+ int n = 100 ;
1717 char * callocPtrs[n];
1818 char * mmapPtrs[n];
1919 int mmapLen = 20 ;
2020
2121 // 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++) {
2323 char * callocPtr = (char *)calloc (1 , callocSize);
2424 std::string s = " number " ;
2525 s += std::to_string (i);
@@ -38,7 +38,7 @@ int main(int argc, char* argv[])
3838 }
3939
4040 // 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++) {
4242 char * nextPtr = callocPtrs[j];
4343 std::string actual (nextPtr);
4444 std::string expected = " number " ;
You can’t perform that action at this time.
0 commit comments