Question

c+ The lab materials explain that we should avoid requesting large amount of memory spaces within...

c+

The lab materials explain that we should avoid requesting large amount of memory spaces within a function’s stack frame. What should we do instead if that happens?

Homework Answers

Answer #1

Question

Answer As we know that memory or amount of memory depends only oon function .For suppose if we write a short function or the long function so thier within the long function will take more memory and short function for supppose will take short memory

when a Stack frame is constructed during the calling of function when we allocate memory either implicit or explicit it is always requested using a heap in the form of

malloc()

calloc()

realoc()

Example

#include <stdio.h>

 

int func(int para1, char para2)

{

int local1 = 9;

char local2 = ‘Z’;

return 0;

}

 

int main(int argc, char *argd[])

{

func(7, ‘8’);

return 0;

}
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
We are planning on introducing a new internet device that should drastically reduce the amount of...
We are planning on introducing a new internet device that should drastically reduce the amount of viruses on personal computers. We think the price should be $39.99, but are not sure on the percentage of people that would buy it. We do some research and find the following information; ·Studies from the 1980’s indicate that percentage should be between 30% and 40% ·Similar products were launched recently at a price of $4,000 and nobody bought it. ·A nationwide poll on...
Combinatorial Math: Find the number of nonnegative integer solutions to the equation a+b+c=249. We are given:...
Combinatorial Math: Find the number of nonnegative integer solutions to the equation a+b+c=249. We are given: 10 ≤ a ≤ 30  (you can use an ellipsis between values in this factor instead of listing them all) b is even and b > 50 c ≥ 144 a) Set up the generating function. Do not multiply it out. Do not use a, b or c in the function. Use x as the variable. The first factor should relate to a, the second...
Suppose we have the following returns for large-company stocks and Treasury bills over a six year...
Suppose we have the following returns for large-company stocks and Treasury bills over a six year period: Year Large Company US Treasury Bill 1    3.66 4.66 2   14.44 2.33 3   19.03 4.12 4 –14.65 5.88 5 –32.14 4.90 6   37.27 6.33 a. Calculate the arithmetic average returns for large-company stocks and T-bills over this period. (Do not round intermediate calculations. Enter your answers as a percent rounded to 2 decimal places, e.g., 32.16.) Average returns   Large company stocks %   T-bills...
Notes: Draw separate diagrams for answers to each part of different questions (a, b, & c)....
Notes: Draw separate diagrams for answers to each part of different questions (a, b, & c). Do not combine all your answers on one graph. All of your answers should be based on your graphical analyses. Your written explanations should complement what you draw on your graphs. 1-[Firms Behavior in Labor Market-20 points] a- We are interested in the causal relationship between units of labor demanded by firm (??) and price of firm’s output (???????). What factors do we need...
According to a union agreement, the mean income for all senior-level assembly-line workers in a large...
According to a union agreement, the mean income for all senior-level assembly-line workers in a large company equals $490 per week. A representative of a women's group decides to analyze whether the mean income for female employees matches this norm. For a random sample of nine female employees, using software, she obtains a 95% confidence interval of (464 ,498 ). Explain what is wrong with each of the following interpretations of this interval. Complete parts a through d below.a. We...
SETUP In today’s lab we will measure specific heat using a calorimeter. A calorimeter consist of...
SETUP In today’s lab we will measure specific heat using a calorimeter. A calorimeter consist of a small metal cup inside a larger metal container, with a lid.  The cups are thermally separated from each other by means of air and a wooden ring, thus reducing the thermal conduction to a minimum. To keep track of how much water etc. we have, the whole calorimeter will be placed on a digital scale. Make sure to zero the scale before you place...
Below is the background info for the lab assignment. The 4 blank boxes are the questions...
Below is the background info for the lab assignment. The 4 blank boxes are the questions I would like answers too. The end point for the fine titration was 35.90 mL in the burette when the solution turned bright green again. And the coarse titration I got 35.36mL as the end point. 35.9 mL is exact in case you need that info. Thanks! Background In this lab, we will determine the amount of alcohol (ethanol), C2H5OH, in a commercial vodka...
For this Discussion, review the client in the case study within the Learning Resources. Consider symptoms...
For this Discussion, review the client in the case study within the Learning Resources. Consider symptoms or signs presented by the client for a diagnosis. Think about how you, as a future professional in the field, might justify your rationale for diagnosis. Consider what other information you may need for diagnosis on the basis of the DSM diagnostic criteria. FEMALE SPEAKER: Well, I just keep thinking what if something happens? I mean I've always had trouble concentrating. But this time,...
Complete this in C++ and explain what is being done. 1      Introduction The functions in the...
Complete this in C++ and explain what is being done. 1      Introduction The functions in the following subsections can all go in one big file called pointerpractice.cpp. 1.1     Basics Write a function, int square 1(int∗ p), that takes a pointer to an int and returns the square of the int that it points to. Write a function, void square 2(int∗ p), that takes a pointer to an int and replaces that int (the one pointed to by p) with its...
The inspection division of the Lee County Weights and Measures Department is interested in estimating the...
The inspection division of the Lee County Weights and Measures Department is interested in estimating the actual amount of soft drink that is placed in 2-liter bottles at the local bottling plant of a large nationally known soft-drink company. The bottling plant has informed the inspection division that the standard deviation for 2-liter bottles is 0.05 liter, i.e. the population standard deviation is σ = 0.05. A random sample of one hundred 2-liter bottles obtained from this bottling plant indicates...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT