Advertisement
Max13

Untitled

Feb 5th, 2012
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. size_t round_pagesize(size_t size)
  2. {
  3. size_t pagesize;
  4. size_t tot;
  5.  
  6. pagesize = getpagesize();
  7. if (size <= pagesize)
  8. return (pagesize);
  9. tot = (size + (pagesize - (size % pagesize)));
  10. printf("%u - %u - %u", (uint) size, (uint) tot, (uint) pagesize);
  11. return (tot);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement