Section Header

    + name := Strict MEMORY;

    - comment := "Memory manager.";

    - external := ` #define MINIMUM_SIZE 256 void *table_size[MINIMUM_SIZE/sizeof(void *)]; void *last_block[64]; `;

Section Inherit

    - parent_object:OBJECT :=

MACRO ALLOCATOR


Section Mapping

    + previous_linear:UINTEGER_32;

    + size_and_id:UINTEGER_32;
---------------> Limit for Busy (64 bits)

    + next_free :MEMORY;

    + previous_free:MEMORY;
---------------> Limit for Free

Section MEMORY

    - object_size:INTEGER <-
        2x32bits = 64bits

    - this:POINTER <-

    - begin:POINTER <-

    - size:UINTEGER_32 <-

    - next_linear:MEMORY <-

    - id:UINTEGER_32 <-

    - id_end:UINTEGER_32 <-

    - is_end:BOOLEAN <-

    - set_previous_linear p:UINTEGER_32 <-

    - set_size_and_id s:UINTEGER_32 <-

    - get_index p:POINTER :UINTEGER_32 <-

    - nb_page:UINTEGER_32;

    - put_last m:MEMORY to idx:UINTEGER_32 <-

    - get_last idx:UINTEGER_32 :MEMORY <-

    - bound_test ptr:POINTER :BOOLEAN <-

    - search_capacity <-

    - new_page:MEMORY <-

Busy / Free Block.


    - id_free:UINTEGER_32 <-

    - id_busy:UINTEGER_32 <-

    - set_next_free n:MEMORY <-

    - set_previous_free p:MEMORY <-

    - delete_link_free <-

    - add_link_free <-

Section MEMORY

    - first_free:MEMORY;

Management.


    - to_free idx:UINTEGER_32 <-

    - to_busy sz:UINTEGER_32 index idx:UINTEGER_32 <-

    - resize new_size:UINTEGER_32 index idx:UINTEGER_32 :MEMORY <-

Searching.


    - search new_size:UINTEGER_32 :MEMORY <-

    - new_lab t:UINTEGER_32 :POINTER <-

Section Public

MICRO ALLOCATOR


    - alloc_type t:UINTEGER_32 size sz:UINTEGER_32 :POINTER <-
        Allocation for object without type. (LAB_TYPE)

    - free p:POINTER type t:UINTEGER_32 <-

    - alloc_size sz:UINTEGER_32 :POINTER <-
        Allocation for object with type. (LAB_SIZE)

    - free p:POINTER size sz:UINTEGER_32 <-

    - alloc_dynamic sz:UINTEGER_32 :POINTER <-
        Allocation NATIVE_ARRAY[E]. (LAB_SIZE or malloc)

    - realloc_dynamic p:POINTER old_size old_sz:UINTEGER_32 new_size new_sz:UINTEGER_32 :POINTER <-

    - free_dynamic p:POINTER size sz:UINTEGER_32 <-

GARBAGE COLLECTOR