projects
/
satune.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42e411a
)
Fix memory allocation error
author
bdemsky
<bdemsky@uci.edu>
Tue, 11 Jul 2017 00:24:15 +0000
(17:24 -0700)
committer
bdemsky
<bdemsky@uci.edu>
Tue, 11 Jul 2017 00:24:15 +0000
(17:24 -0700)
src/Encoders/elementencoding.c
patch
|
blob
|
history
diff --git
a/src/Encoders/elementencoding.c
b/src/Encoders/elementencoding.c
index 6ed38c2a95214da6f809c286b2ad5dc8434ccc0d..a5158abf7e06dace78f447a5f53b97fc1841d38a 100644
(file)
--- a/
src/Encoders/elementencoding.c
+++ b/
src/Encoders/elementencoding.c
@@
-29,7
+29,8
@@
void allocEncodingArrayElement(ElementEncoding *This, uint size) {
}
void allocInUseArrayElement(ElementEncoding *This, uint size) {
- This->inUseArray=ourcalloc(1, size >> 6);
+ uint bytes = ((size + ((1 << 9)-1)) >> 6)&~7;//Depends on size of inUseArray
+ This->inUseArray=ourcalloc(1, bytes);
}
void allocElementConstraintVariables(ElementEncoding* This, uint numVars){