mirror of git://sourceware.org/git/glibc.git
benchtests: Avoid truncation in random memcpy/memset benchmarks
Use uint16_t rather than uint8_t for the size arrays. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
parent
bc5cf78543
commit
122847e4a2
|
|
@ -34,7 +34,7 @@ typedef struct { uint8_t align; uint16_t freq; } align_data_t;
|
|||
|
||||
#define SIZE_NUM 65536
|
||||
#define SIZE_MASK (SIZE_NUM-1)
|
||||
static uint8_t size_arr[SIZE_NUM];
|
||||
static uint16_t size_arr[SIZE_NUM];
|
||||
|
||||
/* Frequency data for memcpy of less than 4096 bytes based on SPEC2017. */
|
||||
static freq_data_t size_freq[] =
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ typedef struct { uint8_t align; uint16_t freq; } align_data_t;
|
|||
|
||||
#define SIZE_NUM 65536
|
||||
#define SIZE_MASK (SIZE_NUM-1)
|
||||
static uint8_t len_arr[SIZE_NUM];
|
||||
static uint16_t len_arr[SIZE_NUM];
|
||||
|
||||
/* Frequency data for memset sizes up to 4096 bytes based on SPEC2017. */
|
||||
static freq_data_t memset_len_freq[] =
|
||||
|
|
|
|||
Loading…
Reference in New Issue