[qfcc] Align progs memory to 32 bytes in the test harness

This ensures the engine can align everything to 32 bytes.
This commit is contained in:
Bill Currie 2022-01-26 16:57:34 +09:00
parent a2f4522e76
commit a2fd42f174

View file

@ -120,10 +120,14 @@ load_file (progs_t *pr, const char *name, off_t *_size)
return sym;
}
#define ALIGN 32
static void *
allocate_progs_mem (progs_t *pr, int size)
{
return malloc (size);
intptr_t mem = (intptr_t) malloc (size + ALIGN);
mem = (mem + ALIGN - 1) & ~(ALIGN - 1);
return (void *) mem;
}
static void