Changeset 7a3ccbc in mainline for kernel/generic/src/ps/ps.c


Ignore:
Timestamp:
2010-04-07T10:41:42Z (14 years ago)
Author:
Stanislav Kozina <stanislav.kozina@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a325832
Parents:
36b5b0f
Message:

Echo task memory in kb instead of pages count

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ps/ps.c

    r36b5b0f r7a3ccbc  
    9090}
    9191
    92 static size_t get_pages_count(as_t *as)
     92static uint64_t get_task_memory(as_t *as)
    9393{
    9494        mutex_lock(&as->lock);
     
    115115        mutex_unlock(&as->lock);
    116116       
    117         return result;
     117        return result * PAGE_SIZE;
    118118}
    119119
     
    144144        copy_to_uspace(&uspace_info->kcycles, &kcycles, sizeof(uint64_t));
    145145
    146         size_t pages = get_pages_count(t->as);
    147         copy_to_uspace(&uspace_info->pages, &pages, sizeof(pages));
     146        uint64_t memory = get_task_memory(t->as);
     147        copy_to_uspace(&uspace_info->virt_mem, &memory, sizeof(memory));
    148148
    149149        int thread_count = atomic_get(&t->refcount);
Note: See TracChangeset for help on using the changeset viewer.