-- MiscPack.pack
-- Last edit by:
-- Yokota  March 23, 1981  10:11 AM  All the procedures in Resident are moved into ResidentCool. FreeSpace, SpaceFromLongPointer and CheckOwner in HeapImpl are moved into Nodes.

-- Gobbel  January 31, 1981  11:33 AM  Moved frame packs into PilotKernelFrames.pack.

-- Jose  January 27, 1981  2:10 PM  Deleted LargeNode, NodeSize, RelativePointerToPointer from ResidentHeapImplt
-- Gobbel  January 19, 1981  4:27 PM  Created ResidentCool code pack

Misc: SEGMENT =
BEGIN

ByteBlt: CODE PACK =
  {StreamImpl [ByteBlt]};

ResidentCool: CODE PACK = -- goes in display memory on Dandelion
  BEGIN
  ResidentHeapImpl [FreeNode, MakeNode, SplitNode, WordsToPages];
  UtilitiesImpl EXCEPT Initialization;
  ZoneImpl [AddSegment, MakeNode, FreeNode, Split, SplitNode, ValidateZone];
  END;

Streams: CODE PACK =
   {StreamImpl EXCEPT Initialization, ByteBlt};

-- The following code packs are non-resident and depend upon the resident
-- heap only creating, deleting, splitting nodes and adding segments.

Nodes: CODE PACK =
  BEGIN
  HeapImpl [CheckOwner, Expand, ExpandHeap, ExpandMDS, FreeLargeOrRegularNode,
    FreeMDSNode, FreeNode, FreeSpace, MakeLargeNode, MakeMDSNode, MakeNode,
    MakeSpace, Narrow, PagesForNewSegment, SpaceFromLongPointer];
  END;

HeapPruning: CODE PACK =
   BEGIN
   HeapImpl [EnumerateSpaces, Prune, PruneHeap, PruneMDS];
   ZoneImpl [GetAttributes, GetSegmentAttributes, RemoveSegment];
   END;

Attributes: CODE PACK =
   BEGIN
   HeapImpl [GetAttributes, GetAttributesHeap, GetAttributesMDS];
   ZoneImpl [NodeSize];
   END;

CreateDelete: CODE PACK =
   BEGIN
   HeapImpl [Create, CreateHeap, CreateMDS, Delete, DeleteHeap, DeleteMDS,
   MakeResident, MakeResidentHeap, MakeResidentMDS, MakeSwappable,
   MakeSwappableHeap, MakeSwappableMDS];
   ZoneImpl [Create];
   END;

Recreating: CODE PACK =
   {ZoneImpl [GetRootNode, Recreate, SetRootNode]};

Checking: CODE PACK =
   BEGIN
   HeapImpl [SetChecking, SetCheckingHeap, SetCheckingMDS];
   ZoneImpl [CheckNode, CheckZone, SetChecking];
   END;

Initialization: CODE PACK =
   BEGIN
   HeapImpl [InitializeHeap, MAIN];
   ResidentHeapImpl [InitializeResidentHeap, MAIN];
   StreamImpl [InitializeStream, MAIN];
   UtilitiesImpl [InitializeUtilities, MAIN];
   ZoneImpl [InitializeZone, MAIN];
   END;
END;