S
spekyuman
What processes occur during a function call? Specifically, how are
pointers and references treated during this time? What happens to
their memory and what they reference during this particular time? Here
are some example functions to help with the elaboration process:
Object naiveFunction(Object copy)
{
// sizeof (copy) => 750 x 2^20 bytes
return copy;
}
void pointerFunction(Object* ptr)
{
// sizeof (ptr) => 4 bytes
// sizeof (*ptr) => 750 x 2^20 bytes
}
void referenceFunction(Object& ref)
{
// sizeof (ref) => 750 x 2^20 bytes
}
pointers and references treated during this time? What happens to
their memory and what they reference during this particular time? Here
are some example functions to help with the elaboration process:
Object naiveFunction(Object copy)
{
// sizeof (copy) => 750 x 2^20 bytes
return copy;
}
void pointerFunction(Object* ptr)
{
// sizeof (ptr) => 4 bytes
// sizeof (*ptr) => 750 x 2^20 bytes
}
void referenceFunction(Object& ref)
{
// sizeof (ref) => 750 x 2^20 bytes
}