ECEn 424 Set #4 - ECEn424HomeworkSet#4...

This preview shows page 1 out of 1 page.

ECEn 424 Homework Set #4 Submit your (hardcopy) solutions to the problems below in the homework box by 5:00 PM on the assigned date. 1. Problem 4.45 2. Problem 4.46 3. Problem 424­2: You are to determine how big stacks can grow to be. For part A, write C code that calls a single function with a large stack­allocated array, and see how big that array can be. For part B, write C code that calls a function recursively, and see what the maximum recursion depth is. For both parts A and B, what error message do you get when you overflow the stack? Do you get different results if you run on a different machine (different OS or different version of Linux)? Do you get different results compiling for the IA32 ("­m32") or for the x86­64 ISA (with "­m64" )? If you are running the bash shell (pretty common on Linux and Macs), you can find the default stack size (and other system information) by typing "ulimit ­a". (If you are running the tcsh shell, there is a "limit" command that gives similar but not identical functionality.) Does the listed size agree with the results of
Image of page 1
  • Winter '17
  • James Archibald
  • internet search., stack size

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern