Ejemplo n.º 1
0
    void FIFOAllocator::destroy()
    {
      volatile ThreadNode *iter = thread_node_list_;
      while (NULL != iter)
      {
        revert_page_(iter->id, NULL);
        iter = iter->next;
      }
      thread_node_list_ = NULL;
      thread_node_allocator_.reuse();

      if (0 != id_map_.size())
      {
        TBSYS_LOG(ERROR, "still memory have not been free: ref_page_cnt=%d", id_map_.size());
        BACKTRACE(WARN, true, "fifo_allocator not clear");
      }

      Page *page = NULL;
      while (OB_SUCCESS == free_list_.pop(page))
      {
        if (NULL != page)
        {
          ob_free(page);
        }
      }
      free_list_.destroy();

      id_map_.destroy();

      total_limit_ = 0;
      hold_limit_ = 0;
      page_size_ = 0;
      allocated_size_ = 0;
      inited_ = false;
    }
logical DLInterpreter :: BT ( )
{

  return(BACKTRACE());

}