## `share` -- create a unique data representation

#### Introduction

`share(``)` creates a unique data representation for every MuPAD object. This function serves a highly technical purpose. Usually, there should be no need for a user to call this function.

#### Call(s)

`share()`

#### Returns

the void object of type `DOM_NULL`.

#### Related Functions

`bytes`

#### Details

- If `share` is executed, a unique data representation is created for every MuPAD object before the next command is executed on the interactive level. This means that every MuPAD object is only located once in the physical memory. Thus, `share` reduces the number of logical bytes used in a MuPAD session.
- `share` is a very time consuming function which also needs a lot of memory during its execution.
- `share` is not executed immediately; it is only executed on returning to the interactive level. Therefore, it cannot be used in procedures to release memory during a longer computation.
- `share` is a function of the system kernel.

#### Example 1

The following example was carried out in a fresh MuPAD session. One sees that `share` reduces the number of logical bytes. However, one observes that the kernel needs some extra physical memory for executing the `share` call. The output of the example will differ on different machines:

    >> int(x, x): bytes()

                                 1980600, 2191872, 2147483647

    >> share(): bytes()

                                 1201076, 2830848, 2147483647

#### Changes

- new function

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000