On Nov 25, 2010, at 10:12 PM, Zhouping Liu wrote:

> 
> ----- "Garrett Cooper" <[email protected]> wrote:
> 
>> From: "Garrett Cooper" <[email protected]>
>> To: "Zhouping Liu" <[email protected]>
>> Cc: [email protected]
>> Sent: Friday, November 26, 2010 4:41:24 AM GMT +08:00 Beijing / Chongqing / 
>> Hong Kong / Urumqi
>> Subject: Re: [LTP] [PATCH v2]extend the -I option value
>> 
>> On Thu, Nov 25, 2010 at 1:23 AM, Zhouping Liu <[email protected]>
>> wrote:
>>> Hi,all
>>> I found it just support a small value for -I option.
>>> when I run '#./hugemmap04 -I 3600 -H /var/hugetlbfs',the test
>> returned
>>> immediately.
>>> the -I option details :
>>> -I x Execute test for x seconds
>>> And if you give a much bigger value to -I option such as 3600 or
>> larger, you
>>> will find the -I option disabled,
>>> so I changed the lib/parse_opts.c file, and just modified the
>> stop_time
>>> variable type from 'int' to 'double',
>>> after changed, it can support a very bigger value for -I option.
>> 
>>    Or maybe this should be time_t or long?
>>    Honestly, this could potentially introduce a lot of headache if
>> done improperly in lib/parse_opts.c (especially if you use a double
>> precisioned time amount as this could seriously impact architectures
>> without FPUs).
> yeah,you're right, then I think it should change long long type,as there
> is no apparent difference between int type and long type.(the long long
> type can arrive at the maximum:9223372036854775807,and it can support a much 
> bigger value.)

Are you so sure about that statement?

(amd64 FreeBSD CURRENT)
$ ~/test_int_and_long 
(I) 4294967295, (L) 18446744073709551615

(i386 Fedora 13)
$ ~/test_int_and_long
(I) 4294967295, (L) 4294967295

$ cat test_int_and_long.c 
#include <limits.h>
#include <stdio.h>

int
main(void)
{
        printf("(I) %u, (L) %lu\n", UINT_MAX, ULONG_MAX);
        return (0);
}

Longs are 32-bit integers on 32-bit architectures and 64-bit integers on 64-bit 
architectures...

> ( but I also have a question: why the STD_LOOP_DURATION (defined in 
> lib/parse_opts.c) use float type? )

Don't know... I'll have to look.
Thanks,
-Garrett
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to