Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/mm/page_ht.c

    r235e6c7 rc868e2d  
    5959static void ht_mapping_remove(as_t *, uintptr_t);
    6060static pte_t *ht_mapping_find(as_t *, uintptr_t, bool);
     61static void ht_mapping_make_global(uintptr_t, size_t);
     62
     63slab_cache_t *pte_cache = NULL;
    6164
    6265/**
     
    8689        .mapping_insert = ht_mapping_insert,
    8790        .mapping_remove = ht_mapping_remove,
    88         .mapping_find = ht_mapping_find
     91        .mapping_find = ht_mapping_find,
     92        .mapping_make_global = ht_mapping_make_global
    8993};
    9094
     
    163167        pte_t *pte = hash_table_get_instance(item, pte_t, link);
    164168       
    165         free(pte);
     169        slab_free(pte_cache, pte);
    166170}
    167171
     
    188192       
    189193        if (!hash_table_find(&page_ht, key)) {
    190                 pte_t *pte = (pte_t *) malloc(sizeof(pte_t), FRAME_ATOMIC);
     194                pte_t *pte = slab_alloc(pte_cache, FRAME_LOWMEM | FRAME_ATOMIC);
    191195                ASSERT(pte != NULL);
    192196               
     
    260264}
    261265
     266void ht_mapping_make_global(uintptr_t base, size_t size)
     267{
     268        /* nothing to do */
     269}
     270
    262271/** @}
    263272 */
Note: See TracChangeset for help on using the changeset viewer.