for( i = 0; i < Pages; i++, addr++ )
{
gaMainBitmap[addr >> 6] |= 1LL << (addr & 63);
- if( MM_GetPhysAddr( (tVAddr)&gaiPageReferences[addr] ) )
+ if( MM_GetPhysAddr( &gaiPageReferences[addr] ) )
gaiPageReferences[addr] = 1;
// Log("page %P refcount = %i", MM_GetRefCount(addr<<12));
rangeID = MM_int_GetRangeID(addr << 12);
{
tVAddr ref_base = ((tVAddr)&gaiPageReferences[ page ]) & ~0xFFF;
// Allocate reference page
- if( !MM_GetPhysAddr(ref_base) )
+ if( !MM_GetPhysAddr(&gaiPageReferences[page]) )
{
const int pages_per_refpage = PAGE_SIZE/sizeof(gaiPageReferences[0]);
int i;
PAGE_ALLOC_SET(page);
if( gaMainBitmap[page >> 6] + 1 == 0 )
gaSuperBitmap[page>> 12] |= 1LL << ((page >> 6) & 63);
- if( MM_GetPhysAddr( (tVAddr)&gaiPageReferences[page] ) )
+ if( MM_GetPhysAddr( &gaiPageReferences[page] ) )
gaiPageReferences[page] = 1;
}
if( PAddr >> 12 > giMaxPhysPage ) return ;
- if( MM_GetPhysAddr( (tVAddr) &gaiPageReferences[page] ) )
+ if( MM_GetPhysAddr( &gaiPageReferences[page] ) )
{
gaiPageReferences[ page ] --;
if( gaiPageReferences[ page ] == 0 )
if( PAddr > giMaxPhysPage ) return 0;
- if( MM_GetPhysAddr( (tVAddr)&gaiPageReferences[PAddr] ) ) {
+ if( MM_GetPhysAddr( &gaiPageReferences[PAddr] ) ) {
return gaiPageReferences[PAddr];
}
// if( !MM_GetRefCount(PAddr) ) return 1;
- if( !MM_GetPhysAddr(node_page) ) {
+ if( !MM_GetPhysAddr((void*)node_page) ) {
if( !MM_Allocate(node_page) )
return -1;
memset( (void*)node_page, 0, PAGE_SIZE );
// if( !MM_GetRefCount(PAddr) ) return 1;
PAddr >>= 12;
- if( !MM_GetPhysAddr( (tVAddr)&gapPageNodes[PAddr] ) ) {
+ if( !MM_GetPhysAddr( &gapPageNodes[PAddr] ) ) {
*Node = NULL;
return 0;
}