- PAddr >>= 12;
-
- // Page doesn't exist
- if( !(gaPageBitmap[PAddr / 32] & (1 << PAddr%32)) )
- return 1;
- // Info is zero if block is not allocated
- if( MM_GetPhysAddr( (tVAddr)&gaPageInfo[PAddr] ) == 0 )
- {
- if(Node) *Node = NULL;
- if(Offset) *Offset = 0;
- }
- else
- {
- if(Node) *Node = gaPageInfo[ PAddr ].Node;
- if(Offset) *Offset = gaPageInfo[ PAddr ].Offset;
+ if( MM_GetRefCount(PAddr) == 0 ) return 1;
+
+ PAddr /= PAGE_SIZE;
+ if( !MM_GetPhysAddr( (tVAddr) &gaPageNodes[PAddr] ) ) {
+ *Node = NULL;
+ return 0;