Skip to content

Commit

Permalink
use common macro for alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
lnussel committed Nov 13, 2005
1 parent bfb2458 commit c95d0c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/qcommon/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ void *Z_TagMalloc( int size, int tag ) {
//
size += sizeof(memblock_t); // account for size of block header
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;
start = base->prev;
Expand Down Expand Up @@ -1745,7 +1745,7 @@ void *Hunk_AllocateTempMemory( int size ) {

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 ) {
Com_Error( ERR_DROP, "Hunk_AllocateTempMemory: failed on %i", size );
Expand Down

0 comments on commit c95d0c2

Please sign in to comment.