expanded class MEMORY

Features exported to ANY

Facilities for tuning up the garbage collection, and everything about memory control.

Direct parents

conformant parents

DISPOSABLE

Known children

conformant children

TEXT_FILE_WRITE

Summary

exported features

Garbage collector information and tuning:

SmartEiffel Garbage collector information and tuning:

Other features:

Details

dispose

Action to be executed just before garbage collection reclaims an object. (The default action is to do nothing at all.) If you want to change the default action, please make your class inherit DISPOSABLE and effect dispose instead of inheriting MEMORY and redefining this dispose feature.

frozen collecting: BOOLEAN

Is garbage collection enabled?

frozen collection_off

Disable garbage collection.

frozen collection_on

Enable garbage collection.

frozen full_collect

Force a full collection cycle if garbage collection is enabled (i.e. collecting is True); do nothing otherwise.

frozen collector_counter: INTEGER

The number of collections actually performed or -1 when the system is not using the SmartEiffel garbage collector (i.e. when the system is compiled using the -no_gc flag).

ensure

  • Result >= -1

frozen smart_eiffel_collector: BOOLEAN

Is the SmartEiffel garbage collector really used?

ensure

  • Result = (collector_counter >= 0)

frozen small_eiffel_collector: BOOLEAN
This feature is obsolete: Use `smart_eiffel_collector' (July 20, 2004)
frozen low_memory_strategy: BOOLEAN

Is the low memory strategy in use? When this strategy is used, the garbage collector try to use as few memory as possible.

require

  • smart_eiffel_collector

frozen set_low_memory_strategy

require

  • smart_eiffel_collector

ensure

  • low_memory_strategy

frozen high_memory_strategy: BOOLEAN

Is the high memory strategy in use? When this strategy is used, the garbage collector assume that more memory can be allocated if necessary.

require

  • smart_eiffel_collector

frozen set_high_memory_strategy

require

  • smart_eiffel_collector

ensure

  • high_memory_strategy

frozen default_memory_strategy: BOOLEAN

Is the default memory strategy in use? This is the default initial mode for the garbage collector (somewhere between low_memory_strategy and high_memory_strategy).

require

  • smart_eiffel_collector

frozen set_default_memory_strategy

require

  • smart_eiffel_collector

ensure

  • default_memory_strategy

frozen allocated_bytes: INTEGER

Total number of allocated bytes of memory in the heap.

require

  • collector_counter >= 0

pointer_size: INTEGER
This feature is obsolete: Use POINTER.object_size (2003/06/23)