Subversion Repositories HelenOS

Rev

Rev 4346 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4346 Rev 4348
Line 990... Line 990...
990
        FRAME_TO_ZONE_FLAGS(flags), hint);
990
        FRAME_TO_ZONE_FLAGS(flags), hint);
991
   
991
   
992
    /* If no memory, reclaim some slab memory,
992
    /* If no memory, reclaim some slab memory,
993
       if it does not help, reclaim all */
993
       if it does not help, reclaim all */
994
    if ((znum == (count_t) -1) && (!(flags & FRAME_NO_RECLAIM))) {
994
    if ((znum == (count_t) -1) && (!(flags & FRAME_NO_RECLAIM))) {
-
 
995
        spinlock_unlock(&zones.lock);
-
 
996
        interrupts_restore(ipl);
-
 
997
       
995
        count_t freed = slab_reclaim(0);
998
        count_t freed = slab_reclaim(0);
996
       
999
       
-
 
1000
        ipl = interrupts_disable();
-
 
1001
        spinlock_lock(&zones.lock);
-
 
1002
       
997
        if (freed > 0)
1003
        if (freed > 0)
998
            znum = find_free_zone(order,
1004
            znum = find_free_zone(order,
999
                FRAME_TO_ZONE_FLAGS(flags), hint);
1005
                FRAME_TO_ZONE_FLAGS(flags), hint);
1000
       
1006
       
1001
        if (znum == (count_t) -1) {
1007
        if (znum == (count_t) -1) {
-
 
1008
            spinlock_unlock(&zones.lock);
-
 
1009
            interrupts_restore(ipl);
-
 
1010
           
1002
            freed = slab_reclaim(SLAB_RECLAIM_ALL);
1011
            freed = slab_reclaim(SLAB_RECLAIM_ALL);
-
 
1012
           
-
 
1013
            ipl = interrupts_disable();
-
 
1014
            spinlock_lock(&zones.lock);
-
 
1015
           
1003
            if (freed > 0)
1016
            if (freed > 0)
1004
                znum = find_free_zone(order,
1017
                znum = find_free_zone(order,
1005
                    FRAME_TO_ZONE_FLAGS(flags), hint);
1018
                    FRAME_TO_ZONE_FLAGS(flags), hint);
1006
        }
1019
        }
1007
    }
1020
    }