Consider the C/C++ function below (syntax may not be exact):
int test(int x)
y = 2;
z = new int;
*z = 3;
return x + y + *z;
cout << test(1);
When during program execution is memory allocated and deallocated for
Read all of Chapter 14 in Weber. Do exercise 14.1,
but you do not need to implement
the best-fit version of HeapManager -- just provide the two sequences
of operations taht the question asks for (one that works for best fit but
not first fit, one vice versa).
The chapter talks about what can happen when memory is
Explain the difference between a dangling pointer and a memory leak.
Include a description of the error(s) that might be caused by each.
Does garbage collection eliminate both dangling pointers and memory
leaks? Explain how or why not.
Read and digest at least one of the primary papers for your
programming language. Feel free to use additional sources to assist with
your understanding. Then answer the following questions:
What individual(s) and/or organization(s) developed your language, and
What motivated the development of your language?
How would you categorize your language? (e.g., functional,
What feature(s) make your language particularly useful
and/or different from other languages?