mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-25 17:29:19 +00:00
ensure allocated code fits under 32-bit boundaries
This commit is contained in:
parent
165b32da39
commit
380a9ed970
@ -5704,7 +5704,10 @@ static uint8 *do_alloc_code(uint32 size, int depth)
|
||||
|
||||
static inline uint8 *alloc_code(uint32 size)
|
||||
{
|
||||
return do_alloc_code(size, 0);
|
||||
uint8 *ptr = do_alloc_code(size, 0);
|
||||
/* allocated code must fit in 32-bit boundaries */
|
||||
assert((uintptr)ptr <= 0xffffffff);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void alloc_cache(void)
|
||||
|
Loading…
Reference in New Issue
Block a user