anchor.diff:  {$endif}
   
   
  -{$ifdef PUREPASCAL}
   const
     BIT_SCANS: array[Byte] of Byte = ({failure}8, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0,
       2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2,
  
positive.code:   // inline SpinLock
    ThreadHeap := UnknownThreadHeap;
    repeat
      if (ThreadHeap.Spin <> 0) then SpinWait(ThreadHeap.Spin, High(NativeUInt));
    until (0 = AtomicCmpExchange(ThreadHeap.Spin, 1, 0));
    try
      // allocation
      ThreadHeap.ErrorAddr := ErrorAddr;
  
negative.code:   PAGESMODE_SYSTEM = 1;
    PAGESMODE_JIT = 2;
  
    THREAD_HEAP_LOCKABLE = 2;
    THREAD_HEAP_LOCKED_BIT = 1;
    THRAED_HEAP_LOCKED = THREAD_HEAP_LOCKABLE or THREAD_HEAP_LOCKED_BIT;
  
    PTR_INVALID = Pointer(1);
    FREEMEM_INVALID = Integer({$ifdef FPC}0{$else}-1{$endif});
    FREEMEM_DONE = Integer({$ifdef FPC}-1{$else}0{$endif});
  