anchor.diff:        nil
     end.
   
  -pop_internal(Mem) ->
  +pop_internal(Mem, Pop) ->
     case header(Mem) of
       {Head,  Tail, NextTail, _SegmSize} when Head < Tail, Head >= ?HEADER_SZ, Tail >= ?HEADER_SZ ->
         {ok,   <<Sz:32/integer>>} = emmap:pread(Mem, Head, 4),
  
positive.code:   end;
  
  handle_call(pop, _From, #state{mem=Mem} = State) ->
    case pop_and_purge(Mem) of
      nil ->
        %% Empty queue
        {reply, nil, State};
      Msg ->
        {reply, Msg, State}
    end;
  
  handle_call(info, _From, #state{mem=Mem} = State) ->
  
negative.code:       Error
    end.
  
  %% @doc Close a previously open queue.
  close(Mem) ->
    emmap:close(Mem).
  
  %% @doc Purge queue.  It is a constant time operation.
  purge_queue(Mem) ->
    case is_empty_queue(Mem) of
      {true, 0} ->
        true;
      {true, _} ->
  