ldmud-3.3.719/
ldmud-3.3.719/doc/
ldmud-3.3.719/doc/efun.de/
ldmud-3.3.719/doc/efun/
ldmud-3.3.719/doc/man/
ldmud-3.3.719/doc/other/
ldmud-3.3.719/mud/
ldmud-3.3.719/mud/heaven7/
ldmud-3.3.719/mud/lp-245/
ldmud-3.3.719/mud/lp-245/banish/
ldmud-3.3.719/mud/lp-245/doc/
ldmud-3.3.719/mud/lp-245/doc/examples/
ldmud-3.3.719/mud/lp-245/doc/sefun/
ldmud-3.3.719/mud/lp-245/log/
ldmud-3.3.719/mud/lp-245/obj/Go/
ldmud-3.3.719/mud/lp-245/players/lars/
ldmud-3.3.719/mud/lp-245/room/death/
ldmud-3.3.719/mud/lp-245/room/maze1/
ldmud-3.3.719/mud/lp-245/room/sub/
ldmud-3.3.719/mud/lp-245/secure/
ldmud-3.3.719/mud/sticklib/
ldmud-3.3.719/mud/sticklib/src/
ldmud-3.3.719/mudlib/deprecated/
ldmud-3.3.719/mudlib/uni-crasher/
ldmud-3.3.719/pkg/
ldmud-3.3.719/pkg/debugger/
ldmud-3.3.719/pkg/diff/
ldmud-3.3.719/pkg/misc/
ldmud-3.3.719/src/
ldmud-3.3.719/src/autoconf/
ldmud-3.3.719/src/ptmalloc/
ldmud-3.3.719/src/util/
ldmud-3.3.719/src/util/erq/
ldmud-3.3.719/src/util/indent/hosts/next/
ldmud-3.3.719/src/util/xerq/
ldmud-3.3.719/src/util/xerq/lpc/
ldmud-3.3.719/src/util/xerq/lpc/www/
ldmud-3.3.719/test/generic/
ldmud-3.3.719/test/inc/
ldmud-3.3.719/test/t-0000398/
ldmud-3.3.719/test/t-0000548/
ldmud-3.3.719/test/t-030925/
ldmud-3.3.719/test/t-040413/
ldmud-3.3.719/test/t-041124/
ldmud-3.3.719/test/t-language/
SYNOPSIS
        void low_memory(int what, int limitvalue, int memory, int reservestate)

DESCRIPTION
        This efun is called when there is a (potential) low-memory situation.
        Two different limits for the amount of allocated memory can be
        configured: a soft limit and a hard limit.
        If the soft limit is exceeded, the driver calls low_memory() but does
        nothing else.
        If the hard limit is exceeded, the driver calls low_memory() as well,
        but initiates a garbage collection directly after the call.
        The efun is called as well directly before a user-initiated garbage
        collection is started.

        <what> denotes the type of limit which was exceeded:
        - NO_MALLOC_LIMIT_EXCEEDED   (0)
            No limit was exceeded, by a garbage collection was requested by a
            call to garbage_collection() and it will begin right after
            low_memory() returns.
        - SOFT_MALLOC_LIMIT_EXCEEDED (1)
            The soft limit was exceeded.
        - HARD_MALLOC_LIMIT_EXCEEDED (2)
            The hard limit was exceeded. A garbage collection will begin right
            after low_memory() returns.

        <limit> specifies the numerical value of the limit which was exceeded.
        It is 0 in case of NO_MALLOC_LIMIT_EXCEEDED.

        <memory> specifies the amount of allocated memory right now.

        <reservestate> specifies the current state of the memory reserves of
        the driver. The states of the 3 different reserves are OR'ed together.
        - USER_RESERVE_AVAILABLE   (1)
          The user reserve is available.
        - MASTER_RESERVE_AVAILABLE (2)
          The master reserve is available.
        - SYSTEM_RESERVE_AVAILABLE (4)
          The system reserve is available. 

        This efun might be used to inform users about the garbage collection
        and the expeced long lag.
        Another possibility is to initiate a garbage collection deliberately
        at a suitable time (e.g. during the following night) after the soft
        limit was hit.

REMARKS
        If in a low_memory condition when the memory reserves have been used
        already and they could not be re-allocated after a garbage collection
        slow_shut_down() is called instead of calling this function again.

HISTORY
        Introduced in 3.3.719

SEE ALSO
        debug_info(E), garbage_collection(E), slow_shut_down(M), memory(C)
        malloc(D)