cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

edward_yang
Journeyman III

How to use large pages for C++ objects?

edited from a previous question

Is there a way that I can easily use the large pages to store a large data structure consisting of C++ objects, such as maps and deque? The method described in the following page does not seem to work with C++ stdlib objects. (Or does it?)

http://linuxgazette.net/155/krishnakumar.html

The data structure in question has multiple (many) such objects organized in a graph. There can be > 4million of nodes and >2GB memory used. I noticed that whenever the data structure contains more than 200k nodes,  or the total memory usage more than a few hundred MBs, manipulating the graph becomes very slow with a lot of page faults.

The ability to use large pages (2MB, 4MB or even 1GB) because very attractive here. I'd like to know if there's an easy way to do it. I suppose it's possible to rewrite the member functions in the stdlib classes involving memory allocations, but doing so is too much hassle and alternative ways are highly desired. Thanks.

 

0 Likes
1 Reply
edward_yang
Journeyman III

Sorry to revivie the old topic. Does anyone has any information on this issue? Thanks.

0 Likes