Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Side by Side Diff: sandbox/linux/seccomp/maps.h

Issue 1294001: Make the seccomp sandbox compatible with tcmalloc:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MAPS_H__ 5 #ifndef MAPS_H__
6 #define MAPS_H__ 6 #define MAPS_H__
7 7
8 #include <elf.h> 8 #include <elf.h>
9 #include <functional> 9 #include <functional>
10 #include <map> 10 #include <map>
(...skipping 19 matching lines...) Expand all
30 SystemAllocator<char> > string; 30 SystemAllocator<char> > string;
31 31
32 Maps(int proc_self_maps); 32 Maps(int proc_self_maps);
33 ~Maps() { } 33 ~Maps() { }
34 34
35 protected: 35 protected:
36 // A map with all the libraries currently loaded into the application. 36 // A map with all the libraries currently loaded into the application.
37 // The key is a unique combination of device number, inode number, and 37 // The key is a unique combination of device number, inode number, and
38 // file name. It should be treated as opaque. 38 // file name. It should be treated as opaque.
39 typedef std::map<string, Library, std::less<string>, 39 typedef std::map<string, Library, std::less<string>,
40 SystemAllocator<string> > LibraryMap; 40 SystemAllocator<std::pair<const string,
41 Library> > > LibraryMap;
41 friend class Iterator; 42 friend class Iterator;
42 class Iterator { 43 class Iterator {
43 friend class Maps; 44 friend class Maps;
44 45
45 protected: 46 protected:
46 explicit Iterator(Maps* maps); 47 explicit Iterator(Maps* maps);
47 Iterator(Maps* maps, bool at_beginning, bool at_end); 48 Iterator(Maps* maps, bool at_beginning, bool at_end);
48 Maps::LibraryMap::iterator& getIterator() const; 49 Maps::LibraryMap::iterator& getIterator() const;
49 50
50 public: 51 public:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const Iterator begin_iter_; 85 const Iterator begin_iter_;
85 const Iterator end_iter_; 86 const Iterator end_iter_;
86 87
87 LibraryMap libs_; 88 LibraryMap libs_;
88 char* vsyscall_; 89 char* vsyscall_;
89 }; 90 };
90 91
91 } // namespace 92 } // namespace
92 93
93 #endif // MAPS_H__ 94 #endif // MAPS_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698