anchor.diff:      end;
   
       // push heaps deffered
  -    InternalRecord := CoreInternalRecordPop;
  -    InternalRecord.ThreadHeap := ThreadHeap;
  -    GlobalStorage.HeapsDeferred.Push(InternalRecord);
  +    InternalRecord := TGlobalStorage(nil^).InternalRecordPop;
  +    if (InternalRecord <> nil) then
  +    begin
  +      InternalRecord.ThreadHeap := ThreadHeap;
  +      GlobalStorage := Pointer(NativeInt(@GLOBAL_STORAGE[63]) and MASK_64_CLEAR);
  +      GlobalStorage.HeapsDeferred.Push(InternalRecord);
  +    end else
  +    begin
  +      {$ifdef CONDITIONALEXPRESSIONS}System.Error(reOutOfMemory){$else}System.RunError(203){$endif};
  +    end;
     end else
     begin
       // dirty lock flags
  
positive.code:   if (Result) then
    begin
      GlobalStorage := Pointer(NativeInt(@GLOBAL_STORAGE[63]) and MASK_64_CLEAR);
      AtomicDecrement(NativeInt(GlobalStorage.PagesAllocated), NativeInt(Count));
    end;
  end;
  
  
negative.code:     add rax, rdx
    {$endif}
  end;
  function AtomicDecrement(var Target: NativeUInt): NativeUInt; overload;
  asm
    {$ifdef CPUX86}
      or edx, -1
  