Created
September 14, 2012 10:05
-
-
Save ChrisLundquist/3721142 to your computer and use it in GitHub Desktop.
Proof of concept for Page allocator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
template <int size> class Page{ | |
char bytes[size]; | |
}; | |
int main(void) { | |
Page<10> p1; | |
Page<200> p2; | |
std::cout << "Size p1: " << sizeof(p1) << std::endl; // Size p1: 10 | |
std::cout << "Size p2: " << sizeof(p2) << std::endl; // Size p2: 200 | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment