anchor.diff:  
   function BrainMMGetMemoryBlock(BlockSize: TMemoryBlockSize;
     PagesMode: NativeUInt): MemoryBlock;
  +var
  +  GlobalStorage: PGlobalStorage;
   begin
     // todo
     if (BlockSize <> BLOCK_64K) or (PagesMode = PAGESMODE_USER) then
  
positive.code:     Exit;
    end;
  
    {$ifdef MSWINDOWS}
      Result := VirtualAlloc(nil, SIZE_K64, MEM_COMMIT, PAGE_READWRITE);
    {$else .POSIX}
      Result := memalign(SIZE_K64, SIZE_K64);
    {$endif}
  
    if (Result <> nil) and (PagesMode = PAGESMODE_JIT) then
      ChangeMemoryAccessRights(Result, 64 div 4, [marRead, marWrite, marExecute]);
  end;
  
  function BrainMMFreeMemoryBlock(Block: MemoryBlock; PagesMode: NativeUInt): Boolean;
  begin
    // todo
    if (PagesMode = PAGESMODE_USER) then
  
negative.code:     1: (POINTERS: array[1..22] of Pointer);
    end;
  
    TK4Page = array[0..4 * 1024 - 1] of Byte;
    PK4Page = TK4Page;
  
    PK4PagesOptions = ^TK4PagesOptions;
    TK4PagesOptions = packed record
      Next: PK4PagesOptions;
      Items: PK4Page;
      Count: NativeUInt;
      PagesMode: Byte;
      BlockSize: TMemoryBlockSize{4kb default};
      _Padding: array[3..SizeOf(NativeUInt)] of Byte;
    end;
  
    // 64 bytes aligned global storage
    TGlobalStorage = packed record
      // ToDo PagesHash: array[0..1023] of SupposedPtr{PK4PagesOptions};
      K64BlockCache: packed record
        Stack: TSyncStack;
        Count: NativeUInt;
        _Padding: array[1..64 - SizeOf(TSyncStack) - SizeOf(NativeUInt)] of Byte;
      end;
    end;
    PGlobalStorage = ^TGlobalStorage;
  
  
  var
    MemoryManager: TBrainMemoryManager;
    ThreadHeapList: PThreadHeap;
    GLOBAL_STORAGE: array[0..SizeOf(TGlobalStorage) + 63] of Byte;
  
  {$ifdef BRAINMM_UNITTEST}
    function CurrentThreadHeap: PThreadHeap;
  implementation
  {$endif}
  