ia64/xen-unstable

changeset 119:134b05519a54

bitkeeper revision 1.22.1.6 (3e3fe07f2qF_tQ4Ixhocx0G38HxwOg)

domain.c:
We now properly deallocate domain memory during teardown.
author kaf24@labyrinth.cl.cam.ac.uk
date Tue Feb 04 15:47:11 2003 +0000 (2003-02-04)
parents 73643659824d
children 658b3aeca0e5
files xen-2.4.16/common/domain.c
line diff
     1.1 --- a/xen-2.4.16/common/domain.c	Tue Feb 04 15:34:24 2003 +0000
     1.2 +++ b/xen-2.4.16/common/domain.c	Tue Feb 04 15:47:11 2003 +0000
     1.3 @@ -263,6 +263,17 @@ void release_task(struct task_struct *p)
     1.4      }
     1.5      if ( p->mm.perdomain_pt ) free_page((unsigned long)p->mm.perdomain_pt);
     1.6      free_page((unsigned long)p->shared_info);
     1.7 +    if ( p->tot_pages != 0 )
     1.8 +    {
     1.9 +        /* Splice domain's pages into the free list. */
    1.10 +        struct list_head *first = &frame_table[p->pg_head].list;
    1.11 +        struct list_head *last  = first->prev;
    1.12 +        free_list.next->prev = last;
    1.13 +        last->next = free_list.next;
    1.14 +        free_list.next = first;
    1.15 +        first->prev = &free_list;            
    1.16 +        free_pfns += p->tot_pages;
    1.17 +    }
    1.18      free_task_struct(p);
    1.19  }
    1.20