Rev 1066 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1066 | Rev 2971 | ||
---|---|---|---|
Line 298... | Line 298... | ||
298 | slab->state = 0; |
298 | slab->state = 0; |
299 | list_remove(&slab->link); |
299 | list_remove(&slab->link); |
300 | list_prepend(&slab->link, &page_cache.full_slabs); |
300 | list_prepend(&slab->link, &page_cache.full_slabs); |
301 | page_cache.partial_count--; |
301 | page_cache.partial_count--; |
302 | DBG("%s insert empty page slab\n"); |
302 | DBG("%s insert empty page slab\n", __FUNCTION__); |
303 | }; |
303 | }; |
304 | spinlock_unlock(&page_cache.lock); |
304 | spinlock_unlock(&page_cache.lock); |
305 | 305 | ||
Line 306... | Line 306... | ||
306 | // DBG("alloc_page: %x remain %d\n", frame, slab->avail); |
306 | // DBG("alloc_page: %x remain %d\n", frame, slab->avail); |
Line 394... | Line 394... | ||
394 | if( (slab->state == 0 ) && |
394 | if( (slab->state == 0 ) && |
395 | (slab->avail >= 4)) |
395 | (slab->avail >= 4)) |
396 | { |
396 | { |
397 | slab->state = 1; |
397 | slab->state = 1; |
398 | // list_remove(&slab->link); |
398 | list_remove(&slab->link); |
399 | // list_prepend(&slab->link, &page_cache.partial_slabs); |
399 | list_prepend(&slab->link, &page_cache.partial_slabs); |
400 | // page_cache.partial_count++; |
400 | page_cache.partial_count++; |
Line 401... | Line 401... | ||
401 | 401 | ||
402 | DBG("%s: insert partial page slab\n", __FUNCTION__); |
402 | DBG("%s: insert partial page slab\n", __FUNCTION__); |
403 | } |
403 | } |
Line 438... | Line 438... | ||
438 | { |
438 | { |
439 | return z_core.free_count; |
439 | return z_core.free_count; |
440 | }><>><>><>>>><>><>>><>><>><>><>><>>><>><>><> |
440 | }><>><>><>>>><>><>>><>><>><>><>><>>><>><>><> |
441 | 441 | ||
Line -... | Line 442... | ||
- | 442 | ||
- | 443 | ||
- | 444 |