Changeset cd1ecf11 in mainline
- Timestamp:
- 2018-11-07T17:14:45Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6785b88b
- Parents:
- d9d0088
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/as.c
rd9d0088 rcd1ecf11 324 324 * 325 325 * @return True if the two areas conflict, false otherwise. 326 *327 326 */ 328 327 NO_TRACE static bool area_is_conflicting(uintptr_t addr, … … 331 330 assert((addr % PAGE_SIZE) == 0); 332 331 333 /* Add guard page size unless area is at the end of VA domain */334 332 size_t gsize = P2SZ(count); 335 if (guarded && !overflows(addr, P2SZ(count))) 336 gsize += PAGE_SIZE; 337 338 /* Add guard page size unless area is at the end of VA domain */ 339 size_t agsize = P2SZ(area->pages); 340 if ((area->flags & AS_AREA_GUARD) != 0 && 341 !overflows(area->base, P2SZ(area->pages))) 342 agsize += PAGE_SIZE; 333 size_t agsize = P2SZ(area->pages); 334 335 /* 336 * A guarded area has one guard page before, one page after. 337 * What we do here is: if either area is guarded, we add 338 * PAGE_SIZE to the size of both areas. That guarantees 339 * they will be spaced at least one page apart. 340 */ 341 if (guarded || (area->flags & AS_AREA_GUARD) != 0) { 342 /* Add guard page size unless area is at the end of VA domain */ 343 if (!overflows(addr, P2SZ(count))) 344 gsize += PAGE_SIZE; 345 346 /* Add guard page size unless area is at the end of VA domain */ 347 if (!overflows(area->base, P2SZ(area->pages))) 348 agsize += PAGE_SIZE; 349 } 343 350 344 351 return overlaps(addr, gsize, area->base, agsize);
Note:
See TracChangeset
for help on using the changeset viewer.