git-svn-id: svn://svn.valgrind.org/valgrind/trunk@376
vg_assert(req_pszB < 0x7FFFFFF0);
/* Check that the requested alignment seems reasonable; that is, is
- a power of 2. There must be a better way to do this. What is
- it? */
+ a power of 2. */
switch (req_alignB) {
case 4:
case 8: case 16: case 32: case 64: case 128: case 256:
case 512: case 1024: case 2048: case 4096: case 8192:
case 16384: case 32768: case 65536: case 131072:
+ case 262144:
case 1048576:
/* can't be bothered to calculate larger ones */
break;
vg_assert(req_pszB < 0x7FFFFFF0);
/* Check that the requested alignment seems reasonable; that is, is
- a power of 2. There must be a better way to do this. What is
- it? */
+ a power of 2. */
switch (req_alignB) {
case 4:
case 8: case 16: case 32: case 64: case 128: case 256:
case 512: case 1024: case 2048: case 4096: case 8192:
case 16384: case 32768: case 65536: case 131072:
+ case 262144:
case 1048576:
/* can't be bothered to calculate larger ones */
break;