| 2003 | } |
| 2004 | |
| 2005 | static unsigned int next_pow2(unsigned int x) |
| 2006 | { |
| 2007 | unsigned int y = 1; |
| 2008 | if (x == 0) |
| 2009 | return 0; |
| 2010 | while (y <= x) |
| 2011 | y = y << 1; |
| 2012 | |
| 2013 | return y; |
| 2014 | } |
| 2015 | |
| 2016 | /** |
| 2017 | * Determine if two memory regions overlap. |