{
{ dmt$allocation_log
{

  TYPE
    dmt$al_entry_kind = (dmc$al_allocate, dmc$al_initialize, dmc$al_return_dau,
          dmc$al_software_flawed, dmc$al_reallocate, dmc$al_trim_file),

    dmt$al_entry = record
      avt_index: dmt$active_volume_table_index,
      case kind: dmt$al_entry_kind of

      = dmc$al_allocate =
        allocate_block: dmt$dl_allocate_block,

      = dmc$al_initialize =
        initialize_block: dmt$dl_initialize_block,

      = dmc$al_return_dau =
        return_dau_block: dmt$dl_return_dau_block,

      = dmc$al_software_flawed =
        software_flaw_block: dmt$dl_software_flaw_block,

      = dmc$al_reallocate =
        reallocate_block: dmt$dl_reallocate_block,

      = dmc$al_trim_file =
        trim_file_block: dmt$dl_trim_file_block,

      casend,
    recend;

  TYPE
    dmt$allocation_log = array [0 .. dmc$max_allocation_log_index] of
      dmt$al_entry,

    dmt$allocation_log_index = 0 .. dmc$max_allocation_log_index,

{
{ the field in dmt$allocation_log_info named 'number' must ONLY be
{ referenced using #compare_swap or the osp$ procedures which deal
{ with 'locked variables' when this type is used for a system table
{ (as with dmv$allocation_log).  this is critical to dual processor.
{

    dmt$allocation_log_info = record
      number: ALIGNED [0 MOD 8] integer,
      committed_initialize_count: integer,
      first: dmt$allocation_log_index,
      last: dmt$allocation_log_index,
      entries: dmt$allocation_log,
    recend;

  CONST
{   dmc$max_allocation_log_index = 3125,
    dmc$max_allocation_log_index = 3125*15,

    dmc$max_allocation_log_entries = dmc$max_allocation_log_index + 1,

    dmc$al_trigger_update_threshold = 1600,

    dmc$al_entries_saved_for_inits = 800{*10},

    dmc$al_reject_alloc_threshold = dmc$max_allocation_log_entries -
      dmc$al_entries_saved_for_inits;

?? PUSH (LISTEXT := ON) ??
*copyc dmt$active_volume_table_index
*copyc dmt$device_log_entries
?? POP ??
