如何找到内核空间的内存映射?VA - > PA
我知道proc文件系统/proc/pid/maps,/proc/pid/mappings它为我们提供了用户空间应用程序的映射.有什么类似于查找内核空间映射的东西吗?
谢谢!
我是C++的新手,可能会遗漏一些非常基本的东西,但我正在尝试创建一个向量的向量
#include <iostream>
#include <stack>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
vector<vector<string>> groupAnagrams(vector<string>& strs)
{
vector<vector<string>> result;
map<string,vector<string>> myMap;
if(strs.size() == 0)
{
return result;
}
for(string s : strs)
{
string temp = s;
sort(temp.begin(),temp.end());
auto it = myMap.find(temp);
if(it != myMap.end())
{
it->second.push_back(s);
}
else
{
vector<string> newVector;
newVector.push_back(s);
myMap.insert(pair<string,vector<string>>(temp,newVector));
result.push_back(newVector);
}
}
cout<< myMap["abt"].size() <<endl;
return result;
}
};
int main(int argc, const char * argv[])
{
Solution …Run Code Online (Sandbox Code Playgroud)