aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/mpm.c
diff options
context:
space:
mode:
authorDavid Lovemore2012-08-30 13:48:41 +0100
committerDavid Lovemore2012-08-30 13:48:41 +0100
commited8cd9432d6200bbd8e4f833fcd7b18e9f2af18c (patch)
tree2bea397e4d75c998b4b7e0db053c387a15d5ae61 /mps/code/mpm.c
parentc986c195abc96dcffc6a33a19b05ef47e154fd83 (diff)
downloademacs-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.c9
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
175Bool SizeIsP2(Size size) 175Bool 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
182Bool WordIsP2(Word word)
183{
184 return word > 0 && (word & (word - 1)) == 0;
178} 185}
179 186
180 187