X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/1fe5f5eb5378a47bf0f3451762743c162e40faad..bffa3430fbbaaad29bec0b5bee9c1f0bfc7fd068:/lunaix-os/kernel/mm/cake_export.c diff --git a/lunaix-os/kernel/mm/cake_export.c b/lunaix-os/kernel/mm/cake_export.c index 956423b..e2ecb3a 100644 --- a/lunaix-os/kernel/mm/cake_export.c +++ b/lunaix-os/kernel/mm/cake_export.c @@ -17,7 +17,8 @@ __cake_stat_gonext(struct twimap* map) void __cake_stat_reset(struct twimap* map) { - map->index = container_of(piles.next, struct cake_pile, piles); + map->index = container_of(&piles, struct cake_pile, piles); + twimap_printf(map, "name cakes pages size slices actives\n"); } void @@ -25,10 +26,11 @@ __cake_rd_stat(struct twimap* map) { struct cake_pile* pos = twimap_index(map, struct cake_pile*); twimap_printf(map, - "%s %d %d %d %d\n", + "%s %d %d %d %d %d\n", pos->pile_name, pos->cakes_count, pos->pg_per_cake, + pos->piece_size, pos->pieces_per_cake, pos->alloced_pieces); } @@ -98,7 +100,6 @@ cake_export() map->reset = __cake_stat_reset; map->go_next = __cake_stat_gonext; map->read = __cake_rd_stat; - __cake_stat_reset(map); struct cake_pile *pos, *n; llist_for_each(pos, n, &piles, piles)