mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-01 05:21:02 +00:00
[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:
parent
a2f4522e76
commit
a2fd42f174
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue