- Timestamp:
- 2006-02-04T19:06:07Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3260ada
- Parents:
- 55ab0f1
- Location:
- generic
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/include/mm/as.h
r55ab0f1 r04225a7 49 49 #define UDATA_ADDRESS UDATA_ADDRESS_ARCH 50 50 51 #define FLAG_AS_KERNEL (1<<0) /**< Kernel address space. */ 51 #define FLAG_AS_KERNEL (1 << 0) /**< Kernel address space. */ 52 #define FLAG_AS_EARLYMALLOC (1 << 1) /**< Use early malloc */ 52 53 53 54 enum as_area_type { -
generic/include/mm/frame.h
r55ab0f1 r04225a7 60 60 #define IS_BUDDY_RIGHT_BLOCK_ABS(zone, frame) (((FRAME_INDEX_ABS((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 1) 61 61 62 #define ZONE_BLACKLIST_SIZE 462 #define ZONE_BLACKLIST_SIZE 8 63 63 64 64 struct zone { -
generic/src/mm/as.c
r55ab0f1 r04225a7 66 66 { 67 67 as_arch_init(); 68 AS_KERNEL = as_create(FLAG_AS_KERNEL );68 AS_KERNEL = as_create(FLAG_AS_KERNEL | FLAG_AS_EARLYMALLOC); 69 69 if (!AS_KERNEL) 70 70 panic("can't create kernel address space\n"); … … 79 79 as_t *as; 80 80 81 as = (as_t *) early_malloc(sizeof(as_t)); 81 if (flags & FLAG_AS_EARLYMALLOC) 82 as = (as_t *) early_malloc(sizeof(as_t)); 83 else 84 as = (as_t *) malloc(sizeof(as_t)); 82 85 if (as) { 83 86 list_initialize(&as->as_with_asid_link); -
generic/src/mm/slab.c
r55ab0f1 r04225a7 756 756 spinlock_unlock(&slab_cache_lock); 757 757 } 758 759 #ifdef CONFIG_DEBUG 760 static int _slab_initialized = 0; 761 #endif 758 762 759 763 void slab_cache_init(void) … … 789 793 NULL,NULL,0); 790 794 } 795 #ifdef CONFIG_DEBUG 796 _slab_initialized = 1; 797 #endif 791 798 } 792 799 … … 796 803 { 797 804 int idx; 798 805 806 ASSERT(_slab_initialized); 799 807 ASSERT( size && size <= (1 << SLAB_MAX_MALLOC_W)); 800 808
Note:
See TracChangeset
for help on using the changeset viewer.