Change an Int to a SSizeT to avoid overflows. Fixed bug 148174.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6855
This commit is contained in:
Nicholas Nethercote 2007-09-17 22:46:45 +00:00
parent 86b2e5ec21
commit 3f2e579afa
3 changed files with 3 additions and 3 deletions

View File

@ -255,7 +255,7 @@ extern Bool MC_(record_leak_error) ( ThreadId tid,
extern Bool MC_(clo_partial_loads_ok);
/* Max volume of the freed blocks queue. */
extern Int MC_(clo_freelist_vol);
extern SSizeT MC_(clo_freelist_vol);
/* Do leak check at exit? default: NO */
extern LeakCheckMode MC_(clo_leak_check);

View File

@ -4367,7 +4367,7 @@ static Bool mc_expensive_sanity_check ( void )
/*------------------------------------------------------------*/
Bool MC_(clo_partial_loads_ok) = False;
Int MC_(clo_freelist_vol) = 5000000;
SSizeT MC_(clo_freelist_vol) = 5000000;
LeakCheckMode MC_(clo_leak_check) = LC_Summary;
VgRes MC_(clo_leak_resolution) = Vg_LowRes;
Bool MC_(clo_show_reachable) = False;

View File

@ -71,7 +71,7 @@ VgHashTable MC_(mempool_list) = NULL;
/* Records blocks after freeing. */
static MC_Chunk* freed_list_start = NULL;
static MC_Chunk* freed_list_end = NULL;
static Int freed_list_volume = 0;
static SSizeT freed_list_volume = 0;
/* Put a shadow chunk on the freed blocks queue, possibly freeing up
some of the oldest blocks in the queue at the same time. */