Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 #include <unistd.h>
- 2 #include "random_points.h"
- 3
- 4 struct Tri { Point a; Point b; Point c; };
- 5
- 6 int main(int argc, char **argv)
- 7 {
- 8 // See if this segfaults...
- 9 //Tri test[161700];
- 10 unsigned int target = 161700;
- 11 unsigned int incr = 1000;
- 12 std::cout << "Triangles are of size " << sizeof(Tri) << std::endl;
- 13 for(int ma = 0; ma < target; ma += incr)
- 14 {
- 15 Tri test[ma+1];
- 16 std::cout << "\rAllocated " << ma+1 << " triangles, totalling size " << sizeof(test) << " ";
- 17 std::cout.flush();
- 18 usleep(10000);
- 19 }
- 20 return 0;
- 21 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement