summaryrefslogtreecommitdiffstats
path: root/test/integration/aligned_alloc.c
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2012-04-24 21:22:02 (GMT)
committerJason Evans <je@fb.com>2012-04-29 07:25:34 (GMT)
commit8b49971d0ce0819af78aa2a278c26ecb298ee134 (patch)
treee950255d8d25d34ad7d989c03dfd82c421c7702a /test/integration/aligned_alloc.c
parentf27899402914065a6c1484ea8d81a2c8b70aa659 (diff)
downloadjemalloc-8b49971d0ce0819af78aa2a278c26ecb298ee134.zip
jemalloc-8b49971d0ce0819af78aa2a278c26ecb298ee134.tar.gz
jemalloc-8b49971d0ce0819af78aa2a278c26ecb298ee134.tar.bz2
Avoid variable length arrays and remove declarations within code
MSVC doesn't support C99, and building as C++ to be able to use them is dangerous, as C++ and C99 are incompatible. Introduce a VARIABLE_ARRAY macro that either uses VLA when supported, or alloca() otherwise. Note that using alloca() inside loops doesn't quite work like VLAs, thus the use of VARIABLE_ARRAY there is discouraged. It might be worth investigating ways to check whether VARIABLE_ARRAY is used in such context at runtime in debug builds and bail out if that happens.
Diffstat (limited to 'test/integration/aligned_alloc.c')
0 files changed, 0 insertions, 0 deletions