History log of /system/extras/procmem/procmem.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
10e29de62eb805045437cc9b6ec5a39a464cee67 10-Jan-2013 Ashok Bhat <ashok.bhat@arm.com> procmem: Use size_t instead of int to remove a potential bug.

In procmem.c, num_maps and num_pages are declared as
int. Pointers (int*) to these variables are being
passed to functions pm_process_maps and pm_map_pagemap
respectively, both of which expect size_t * argument.

This will lead to problems in 64-bit systems where
size_t and int_t have different size.

To avoid the issue, num_maps and num_pages are declared
as size_t. In addition, loop counters i and j are now
declared as size_t to avoid comparison of signed int with
unsigned int.

Change-Id: I3fc51f9386c9b2d289d34808e19e3811ca4a3dae
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
/system/extras/procmem/procmem.c
c4c464fc147fc812a38b1e104696ce4052197bf3 01-Apr-2013 Hong-Mei Li <a21834@motorola.com> procmem: fix procmem crash issue

For the case pm_map_pagemap return error(e.g, maps[i]->start==maps[i]->end==0),
the main loop continue without set mis[i] fields, and then mis[i]==0. So that
the corresponding mi item is 0 for this case.
Skip dumping this item to avoid crash.

Change-Id: I7e1bea1abdccfd7594b9d904938b3462dc182a76
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
/system/extras/procmem/procmem.c
e16cb84e2324f05334d18dcf5956f20f44262b62 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/system/extras/procmem/procmem.c
19ddb4b1680760e2d6863c3003976882ebd9d0fa 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/system/extras/procmem/procmem.c
7341494707810f709855ea85ce03a8ec3ac8dbaf 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/system/extras/procmem/procmem.c