Fix SIGBUS on some platforms. Memory alignment matters!

This is a temporary fix; I'm not convinced it will work on all platforms,
so I will probably end up removing all of the memory boundary code
altogether.
This commit is contained in:
Jordan Bancino 2023-05-26 23:05:35 +00:00
parent 4174bcf8f4
commit b02ad117c4

View file

@ -50,8 +50,8 @@ struct MemoryInfo
void *pointer;
};
#define MEM_BOUND_TYPE UInt16
#define MEM_BOUND 0xFFFF
#define MEM_BOUND_TYPE UInt32
#define MEM_BOUND 0xFFFFFFFF
#define MEM_BOUND_LOWER(p) *((MEM_BOUND_TYPE *) p)
#define MEM_BOUND_UPPER(p, x) *(((MEM_BOUND_TYPE *) (((UInt8 *) p) + x)) + 1)