Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int MAX_MEM = 1e8;
- int mpos = 0;
- char mem[MAX_MEM];
- inline void * operator new ( size_t n ) {
- char *res = mem + mpos; mpos += n;
- assert(mpos <= MAX_MEM);
- return (void *)res;
- }
- inline void operator delete ( void * ) { }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement