如何计算内存大小

时间:2017-09-08 11:59:50

标签: c++

我有一个包含以下私人成员的班级语料库

private:
vector<Document> documents_;

类Document私有成员如下

 private:
      vector<Word> words_;

      // Topic path from the root of the tree to a leaf.
      vector<Topic*> path_;

Word类具有以下私有成员

 private:
  int id_;
  int count_;
  int level_;

类Topic具有以下私有成员

    private:
  int topic_word_no_;
  // Parent topic.
  Topic* parent_;

  // Children topics.
  vector<Topic*> children_;

  // The tree which this topic belongs to.
  Tree* tree_;

并且类树具有以下私有成员

private:
  // Depth of the tree.
  int depth_;
  vector<double> eta_;

  // Root topic of the tree.
  // Each node of the tree is associated with a topic.
  Topic* root_topic_;

  // The next id for the following topic.
  int next_id_;

如果在语料库中有10个文件,我如何计算总内存?

0 个答案:

没有答案