+
Point of view
All features
class STRING_RECYCLING_POOL
Summary
Remember that STRING_RECYCLING_ITEM is expanded. It explains that some algorithms look like they could be simplified. In fact they cannot.
Direct parents
Insert list: MEMORY, PLATFORM, STRING_HANDLER
Class invariant
Overview
Creation features
{ANY}
Features
{ANY}
{}
Maximum:
{}
Minimum:
{}
Bits:
{}
Garbage collector information and tuning:
{ANY}
Liberty Eiffel Garbage collector information and tuning:
{ANY}
new: STRING
effective function
{ANY}
A brand new STRING with a small default capacity.
ensure
  • Result.is_empty
best_fit (capacity: INTEGER_32): STRING
effective function
{ANY}
A STRING with a capacity at least as great as the given capacity.
ensure
  • Result.is_empty
  • Result.capacity >= capacity
new_twin (string: STRING): STRING
effective function
{ANY}
A copy of the given string.
require
  • string /= Void
ensure
  • Result /= string
  • Result.is_equal(string)
recycle (string: STRING)
effective procedure
{ANY}
Recycles the string.
Note that you should not use the string again (don't keep any reference on it), but use new, best_fit or new_twin to obtain a new STRING.
recycling_item: STRING_RECYCLING_ITEM
writable attribute
{}
writable attribute
{}
The recycled strings
make
effective procedure
{}
items_comparator: STRING_RECYCLING_ITEM_SORTER
writable attribute
{}
Maximum_character_code: INTEGER_16
{}
Largest supported code for CHARACTER values.
ensure
  • meaningful: Result >= 127
Maximum_integer_8: INTEGER_8
is 127
constant attribute
{}
Largest supported value of type INTEGER_8.
Maximum_integer_16: INTEGER_16
is 32767
constant attribute
{}
Largest supported value of type INTEGER_16.
Maximum_integer: INTEGER_32
is 2147483647
constant attribute
{}
Largest supported value of type INTEGER/INTEGER_32.
Maximum_integer_32: INTEGER_32
is 2147483647
constant attribute
{}
Largest supported value of type INTEGER/INTEGER_32.
Maximum_integer_64: INTEGER_64
is 9223372036854775807
constant attribute
{}
Largest supported value of type INTEGER_64.
Maximum_real_32: REAL_32
is {REAL_32 3.4028234663852885981170418348451692544e+38}
constant attribute
{}
Largest non-special (no NaNs nor infinity) supported value of type REAL_32.
Maximum_real: REAL_64
{}
Largest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: 1.79769313486231570....e+308
Maximum_real_64: REAL_64
{}
Largest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: 1.79769313486231570....e+308
Maximum_real_80: REAL_EXTENDED
{}
Largest supported value of type REAL_80.
ensure
Minimum_character_code: INTEGER_16
{}
Smallest supported code for CHARACTER values.
ensure
  • meaningful: Result <= 0
Minimum_integer_8: INTEGER_8
is -128
constant attribute
{}
Smallest supported value of type INTEGER_8.
Minimum_integer_16: INTEGER_16
is -32768
constant attribute
{}
Smallest supported value of type INTEGER_16.
Minimum_integer: INTEGER_32
is -2147483648
constant attribute
{}
Smallest supported value of type INTEGER/INTEGER_32.
Minimum_integer_32: INTEGER_32
is -2147483648
constant attribute
{}
Smallest supported value of type INTEGER/INTEGER_32.
Minimum_integer_64: INTEGER_64
is -9223372036854775808
constant attribute
{}
Smallest supported value of type INTEGER_64.
Minimum_real_32: REAL_32
is {REAL_32 -3.40282346638528859811704183484516925440e+38}
constant attribute
{}
Smallest non-special (no NaNs nor infinity) supported value of type REAL_32.
Minimum_real: REAL_64
{}
Smallest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: -1.79769313486231570....e+308
Minimum_real_64: REAL_64
{}
Smallest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: -1.79769313486231570....e+308
Minimum_real_80: REAL_64
{}
Smallest supported value of type REAL_80.
ensure
  • meaningful: Result <= 0.0
Boolean_bits: INTEGER_32
{}
Number of bits in a value of type BOOLEAN.
ensure
  • meaningful: Result >= 1
Character_bits: INTEGER_32
{}
Number of bits in a value of type CHARACTER.
ensure
Integer_bits: INTEGER_32
{}
Number of bits in a value of type INTEGER.
ensure
  • integer_definition: Result = 32
Real_bits: INTEGER_32
is 64
constant attribute
{}
Number of bits in a value of type REAL.
Pointer_bits: INTEGER_32
{}
Number of bits in a value of type POINTER.
collecting: BOOLEAN
frozen
{ANY}
Is garbage collection enabled?
collection_off
frozen
{ANY}
Disable garbage collection.
Call this always in pairs with collection_on´.
collection_on
frozen
{ANY}
Enable garbage collection.
Call this always in pairs with collection_off´.
full_collect
frozen
{ANY}
Force a full collection cycle if garbage collection enabled (i.e. collecting is True); do nothing otherwise.
collector_counter: INTEGER_32
frozen
{ANY}
The number of collections actually performed or -1 when the system is not using any garbage collector (i.e. when the system is compiled using the -no_gc flag).
ensure
  • Result >= -1
smart_eiffel_collector: BOOLEAN
frozen
effective function
{ANY}
Is the Liberty Eiffel garbage collector really used?
ensure
low_memory_strategy: BOOLEAN
frozen
effective function
{ANY}
Is the low memory strategy in use?
When this strategy is used, the garbage collector tries to use as few memory as possible.
require
set_low_memory_strategy
frozen
effective procedure
{ANY}
high_memory_strategy: BOOLEAN
frozen
effective function
{ANY}
Is the high memory strategy in use?
When this strategy is used, the garbage collector assumes that more memory can be allocated if necessary.
require
set_high_memory_strategy
frozen
effective procedure
{ANY}
default_memory_strategy: BOOLEAN
frozen
effective function
{ANY}
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
set_default_memory_strategy
frozen
effective procedure
{ANY}
allocated_bytes: INTEGER_32
frozen
{ANY}
Total number of allocated bytes of memory in the heap.
allow_gc_before_exit
frozen
effective procedure
{ANY}
Allow the SmartEiffel GC to run before the process exists.
That is the default state when the Liberty Eiffel GC is used and contracts are checked.
require
forbid_gc_before_exit
frozen
effective procedure
{ANY}
Forbid the Liberty Eiffel GC to run at the end of the process run.
That is the default state when the Liberty Eiffel GC is used but the contracts are not checked.
require