mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 14:41:42 +00:00
use common macro for alignment
This commit is contained in:
parent
bfb24584f5
commit
c95d0c29e4
1 changed files with 2 additions and 2 deletions
|
@ -928,7 +928,7 @@ void *Z_TagMalloc( int size, int tag ) {
|
||||||
//
|
//
|
||||||
size += sizeof(memblock_t); // account for size of block header
|
size += sizeof(memblock_t); // account for size of block header
|
||||||
size += 4; // space for memory trash tester
|
size += 4; // space for memory trash tester
|
||||||
size = (size + sizeof(void*)-1)&~(sizeof(void*)-1); // align to 32/64 bit boundary
|
size = ALIGN(size); // align to 32/64 bit boundary
|
||||||
|
|
||||||
base = rover = zone->rover;
|
base = rover = zone->rover;
|
||||||
start = base->prev;
|
start = base->prev;
|
||||||
|
@ -1745,7 +1745,7 @@ void *Hunk_AllocateTempMemory( int size ) {
|
||||||
|
|
||||||
Hunk_SwapBanks();
|
Hunk_SwapBanks();
|
||||||
|
|
||||||
size = ( (size+sizeof(void*)-1)&~(sizeof(void*)-1) ) + sizeof( hunkHeader_t );
|
size = ALIGN(size) + sizeof( hunkHeader_t );
|
||||||
|
|
||||||
if ( hunk_temp->temp + hunk_permanent->permanent + size > s_hunkTotal ) {
|
if ( hunk_temp->temp + hunk_permanent->permanent + size > s_hunkTotal ) {
|
||||||
Com_Error( ERR_DROP, "Hunk_AllocateTempMemory: failed on %i", size );
|
Com_Error( ERR_DROP, "Hunk_AllocateTempMemory: failed on %i", size );
|
||||||
|
|
Loading…
Reference in a new issue