Changeset 04225a7 in mainline for generic/src/mm/slab.c


Ignore:
Timestamp:
2006-02-04T19:06:07Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3260ada
Parents:
55ab0f1
Message:

Fixed boot process not to call malloc when slab not initialized.
Added simics workaround.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/mm/slab.c

    r55ab0f1 r04225a7  
    756756        spinlock_unlock(&slab_cache_lock);
    757757}
     758
     759#ifdef CONFIG_DEBUG
     760static int _slab_initialized = 0;
     761#endif
    758762
    759763void slab_cache_init(void)
     
    789793                                                     NULL,NULL,0);
    790794        }
     795#ifdef CONFIG_DEBUG       
     796        _slab_initialized = 1;
     797#endif
    791798}
    792799
     
    796803{
    797804        int idx;
    798        
     805
     806        ASSERT(_slab_initialized);
    799807        ASSERT( size && size <= (1 << SLAB_MAX_MALLOC_W));
    800808       
Note: See TracChangeset for help on using the changeset viewer.