Issue #1307 - Part 4: Stop using variable-length arrays.

"USING VLA'S IS ACTIVELY STUPID! It generates much more code, and much
slower code (and more fragile code), than just using a fixed key size
would have done." -- Linus Torvalds
This commit is contained in:
wolfbeast 2019-11-30 15:42:59 +01:00 • committed by Roy Tam
commit 442f6b3252
2 changed files with 20 additions and 38 deletions

View file

@ -381,10 +381,6 @@ void *_mmap(void *addr, size_t length, int prot, int flags,
#define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
#endif
#ifdef MOZ_MEMORY_WINDOWS
/* MSVC++ does not support C99 variable-length arrays. */
# define RB_NO_C99_VARARRAYS
#endif
#include "rb.h"
#ifdef MALLOC_DEBUG