## `Pref::maxMem` -- memory limit for calculation

#### Introduction

`Pref::maxMem(`kbyte`)` sets a memory limit for calculations in kilobyte.

#### Call(s)

`Pref::maxMem( <kbyte>)`

#### Parameters

`kbyte` | - | integer in kilobyte, or `NIL`

#### Returns

the last defined memory limit

#### Related Functions

`Pref::maxTime`, `bytes`, `MAXDEPTH`

#### Details

- The value `0` effects no limitation.
- A call of `Pref::maxMem` without arguments returns the current value. The argument `NIL` resets the default value, which is `0`.

#### Example 1

The memory usage will be limited to a value above the current memory usage, displayed by `bytes`.

    >> bytes()

                            507780, 717300, 2147483647

    >> Pref::maxMem(1):
       [i] $ i = 1 .. 1000000:

          Error: Watchdog reset [watchdog-memory]

#### Changes

- no changes

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