From the memory point of view, the modification of the parameter specification, to include an asterisk, together with the modification of the argument, to include the address-of operator, has a substantial effect; only the address of a structure is copied into the memory reserved for the pointer parameter:
*-- Memory allocated for trade array | v ----------------------------------------- 0 1 2 <-- Index *------------*------------*------------*-- | trade | trade | trade | | object | object | object | *------------*------------*------------*--- 288 | | *-- Memory allocated for trade pointer parameter | | | v | ------- | *-------* *------> | 288 | *-------*
Without the modification, the entire structure is copied into the memory reserved for the structure parameter:
*-- Memory allocated for trade array | v ----------------------------------------- 0 1 2 <-- Index *------------*------------*------------*-- | trade | trade | trade | | object | object | object | *------------*------------*------------*--- 288 | | | | *-- Memory allocated for trade parameter | | | v | ---------------- | *----------------* *-------> | Copied trade | | object | *----------------*