- Make counter volatile to prohibit compiler to perform optimisations.
Without this a compiler could assume that the counter is not updated my the malloc call and remove the test in the assert and always trigger the assertion. This commit was SVN r12419.
Этот коммит содержится в:
родитель
c4c536511f
Коммит
27420fbda3
@ -27,7 +27,7 @@
|
|||||||
#include "opal/runtime/opal.h"
|
#include "opal/runtime/opal.h"
|
||||||
#include "opal/memoryhooks/memory.h"
|
#include "opal/memoryhooks/memory.h"
|
||||||
|
|
||||||
int counter = 0;
|
volatile int counter = 0;
|
||||||
const int bigsize = 100 * 1024 * 1024;
|
const int bigsize = 100 * 1024 * 1024;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user