projects
/
platform
/
upstream
/
qtdeclarative.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a6c3c2
)
Use posix_memalign to ensure assert(!(code & 15))
author
Simon Hausmann
<simon.hausmann@digia.com>
Mon, 8 Oct 2012 18:22:31 +0000
(20:22 +0200)
committer
Simon Hausmann
<simon.hausmann@digia.com>
Mon, 8 Oct 2012 18:22:31 +0000
(20:22 +0200)
main.cpp
patch
|
blob
|
history
diff --git
a/main.cpp
b/main.cpp
index
fa03e08
..
623338f
100644
(file)
--- a/
main.cpp
+++ b/
main.cpp
@@
-197,7
+197,9
@@
static void evaluate(QQmlJS::VM::Context *ctx, const QString &fileName, const QS
IR::Function *globalCode = 0;
const size_t codeSize = 400 * getpagesize();
- uchar *code = (uchar *) malloc(codeSize);
+ uchar *code = 0;
+ posix_memalign((void**)&code, 16, codeSize);
+ assert(code);
assert(! (size_t(code) & 15));
static bool useMoth = !qgetenv("USE_MOTH").isNull();