Changeset dbb29de in mainline


Ignore:
Timestamp:
2014-02-03T19:16:01Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
054f3079, a107c74
Parents:
a17cced
Message:

Do not free the anonymous frames unless there is only one remaining area left.

File:
1 edited

Legend:

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

    ra17cced rdbb29de  
    9393{
    9494        mem_backend_data_t *data = &area->backend_data;
     95        bool last = true;
    9596
    96         if (data->anonymous)
     97        if (area->sh_info) {
     98                mutex_lock(&area->sh_info->lock);
     99                if (area->sh_info->refcount != 1)
     100                        last = false;
     101                mutex_unlock(&area->sh_info->lock);
     102        }
     103       
     104        if (last && data->anonymous)
    97105                frame_free(data->base, data->frames);
    98106}
Note: See TracChangeset for help on using the changeset viewer.