On Sat, Nov 03, 2007 at 07:59:38AM +1100, Nicholas Nethercote wrote: > On Fri, 2 Nov 2007, Oswald Buddenhagen wrote: >> for *way* more clarity >> and less bloat i'd suggest writing the actual expression as >> update_alloc_stats(heap_szB_delta + >> (SizeT)clo_heap_admin*n_heap_blocks_delta); >> instead of making the variable bigger. > > I thought about following your suggestion, but your solution only > fixes that particular expression, whereas making it a SizeT avoids the > possibility of it happening elsewhere. > hmm, but by this logic you have to promote every single variable that is ever used in an offset or size calculation to [S]SizeT, no matter how oversized it seems ... i guess one simply has to keep such issues in mind when doing C. probably *the* reason why Java simply dropped unsigned types.
-- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Valgrind-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-developers
