summaryrefslogtreecommitdiff
path: root/flam3.c
diff options
context:
space:
mode:
Diffstat (limited to 'flam3.c')
-rw-r--r--flam3.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/flam3.c b/flam3.c
index 4564b3f..c8f43ce 100644
--- a/flam3.c
+++ b/flam3.c
@@ -35,6 +35,7 @@
#include <unistd.h>
#endif
#include <errno.h>
+#include <assert.h>
#include <pthread.h>
@@ -3259,7 +3260,8 @@ int flam3_estimate_bounding_box(flam3_genome *cp, double eps, int nsamples,
if (nsamples <= 0) nsamples = 10000;
- points = (double4 *) malloc(sizeof(double4) * nsamples);
+ int ret = posix_memalign ((void **) &points, sizeof (*points), sizeof(*points) * nsamples);
+ assert (ret == 0 && points != NULL);
const double4 start = (double4) { rand_d11(rc), rand_d11(rc), 0.0, 0.0 };
if (prepare_precalc_flags(cp))