diff options
| author | David Lovemore | 2012-08-30 13:48:41 +0100 |
|---|---|---|
| committer | David Lovemore | 2012-08-30 13:48:41 +0100 |
| commit | ed8cd9432d6200bbd8e4f833fcd7b18e9f2af18c (patch) | |
| tree | 2bea397e4d75c998b4b7e0db053c387a15d5ae61 /mps/code/mpm.c | |
| parent | c986c195abc96dcffc6a33a19b05ef47e154fd83 (diff) | |
| download | emacs-ed8cd9432d6200bbd8e4f833fcd7b18e9f2af18c.tar.gz emacs-ed8cd9432d6200bbd8e4f833fcd7b18e9f2af18c.zip | |
In tracescanareatagged use the alignments of pools in the condemned set to determine mask.
Copied from Perforce
Change: 179117
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/mpm.c')
| -rw-r--r-- | mps/code/mpm.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mps/code/mpm.c b/mps/code/mpm.c index 4f9af3f888c..71b93d8a41d 100644 --- a/mps/code/mpm.c +++ b/mps/code/mpm.c | |||
| @@ -174,7 +174,14 @@ Word (WordAlignDown)(Word word, Align alignment) | |||
| 174 | 174 | ||
| 175 | Bool SizeIsP2(Size size) | 175 | Bool SizeIsP2(Size size) |
| 176 | { | 176 | { |
| 177 | return size > 0 && (size & (size - 1)) == 0; | 177 | return WordIsP2((Word)size); |
| 178 | } | ||
| 179 | |||
| 180 | /* WordIsP2 -- tests whether a word is a power of two */ | ||
| 181 | |||
| 182 | Bool WordIsP2(Word word) | ||
| 183 | { | ||
| 184 | return word > 0 && (word & (word - 1)) == 0; | ||
| 178 | } | 185 | } |
| 179 | 186 | ||
| 180 | 187 | ||