Changeset d9d0088 in mainline


Ignore:
Timestamp:
2018-11-07T15:17:05Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cd1ecf11
Parents:
88cc71c0
git-author:
Jiri Svoboda <jiri@…> (2018-10-07 07:15:55)
git-committer:
Jiri Svoboda <jiri@…> (2018-11-07 15:17:05)
Message:

Fix case where no area has lower or equal base. Remove duplicate alignment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/as.c

    r88cc71c0 rd9d0088  
    403403        }
    404404
    405         /* Next area, if any, is the first with base > than our base address */
     405        /*
     406         * Next area, if any, is the first with base > than our base address.
     407         * If there was no area with <= base, we need to look at the first area.
     408         */
     409        if (odlink == NULL)
     410                odlink = odict_first(&as->as_areas);
     411
    406412        if (odlink != NULL) {
    407413                as_area_t *area = odict_get_instance(odlink, as_area_t,
     
    487493                mutex_lock(&area->lock);
    488494
    489                 addr = ALIGN_UP(area->base + P2SZ(area->pages), PAGE_SIZE);
     495                addr = area->base + P2SZ(area->pages);
    490496
    491497                if (guarded || area->flags & AS_AREA_GUARD) {
Note: See TracChangeset for help on using the changeset viewer.