Lines Matching refs:region

265 	MemoryRegion* region;
266 for (region = sRegions; region != NULL; region = region->next) {
268 .isRead = (region->protection & B_READ_AREA) != 0,
269 .isWrite = (region->protection & B_WRITE_AREA) != 0,
270 .isExec = (region->protection & B_EXECUTE_AREA) != 0
272 MapRange(region->virtAdr, region->physAdr, region->size, flags.val);
308 ObjectDeleter<MemoryRegion> region(new(std::nothrow) MemoryRegion());
309 if (!region.IsSet())
312 region->physAdr = AllocPhysPages(size);
313 if (region->physAdr == 0)
316 region->virtAdr = AllocVirtPages(size);
317 region->size = size;
318 region->protection = protection;
320 *address = (void*)region->physAdr;
322 region->next = sRegions;
323 sRegions = region.Detach();
333 MemoryRegion* region = sRegions;
334 while (region != NULL && !(region->physAdr == (phys_addr_t)address)) {
335 prev = region;
336 region = region->next;
338 if (region == NULL) {
342 FreePhysPages(region->physAdr, region->size);
343 FreeVirtPages(region->virtAdr, region->size);
345 sRegions = region->next;
347 prev->next = region->next;
349 delete region;
377 MemoryRegion* region = sRegions;
378 while (region != NULL && !((phys_addr_t)address >= region->physAdr
379 && (phys_addr_t)address < region->physAdr + region->size))
380 region = region->next;
382 if (region == NULL)
385 *result = (addr_t)address - region->physAdr + region->virtAdr;
393 MemoryRegion* region = sRegions;
394 while (region != NULL && !((phys_addr_t)address >= region->virtAdr
395 && (phys_addr_t)address < region->virtAdr + region->size))
396 region = region->next;
398 if (region == NULL)
401 *result = (void*)(address - region->virtAdr + region->physAdr);