Changeset 57da95c in mainline for kernel/generic/src/mm/as.c
- Timestamp:
- 2006-09-18T11:47:28Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 29b2bbf
- Parents:
- f1d1f5d3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/as.c
rf1d1f5d3 r57da95c 85 85 as_operations_t *as_operations = NULL; 86 86 87 /** 88 * Slab for as_t objects. 89 */ 90 static slab_cache_t *as_slab; 91 87 92 /** This lock protects inactive_as_with_asid_head list. It must be acquired before as_t mutex. */ 88 93 SPINLOCK_INITIALIZE(inactive_as_with_asid_lock); … … 106 111 { 107 112 as_arch_init(); 113 114 as_slab = slab_cache_create("as_slab", sizeof(as_t), 0, NULL, NULL, SLAB_CACHE_MAGDEFERRED); 115 108 116 AS_KERNEL = as_create(FLAG_AS_KERNEL); 109 117 if (!AS_KERNEL) … … 120 128 as_t *as; 121 129 122 as = (as_t *) malloc(sizeof(as_t), 0);130 as = (as_t *) slab_alloc(as_slab, 0); 123 131 link_initialize(&as->inactive_as_with_asid_link); 124 132 mutex_initialize(&as->lock); … … 183 191 interrupts_restore(ipl); 184 192 185 free(as);193 slab_free(as_slab, as); 186 194 } 187 195 … … 799 807 } 800 808 mutex_unlock(&old->lock); 809 810 /* 811 * Perform architecture-specific tasks when the address space 812 * is being removed from the CPU. 813 */ 814 as_deinstall_arch(old); 801 815 } 802 816
Note:
See TracChangeset
for help on using the changeset viewer.