summaryrefslogtreecommitdiff
path: root/bitfield.c
diff options
context:
space:
mode:
Diffstat (limited to 'bitfield.c')
-rw-r--r--bitfield.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/bitfield.c b/bitfield.c
index c2826e5..09af58a 100644
--- a/bitfield.c
+++ b/bitfield.c
@@ -42,7 +42,6 @@ static void FlipBitRun(unsigned long *bitmap,
double
DoBitops(void)
{
- const char* context = "CPU:Bitfields";
unsigned long* bitarray = NULL;
unsigned long* bitoparray = NULL;
clock_t total_time = 0;
@@ -55,20 +54,11 @@ DoBitops(void)
is_adjusted = true;
bitarray = realloc(bitarray, ARRAY_SIZE * sizeof(unsigned long));
- if (!bitarray) {
- fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context);
- exit(1);
- }
do {
bitop_array_size += 100;
bitoparray = malloc(bitop_array_size * 2 * sizeof(unsigned long));
- if (!bitoparray) {
- fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context);
- free(bitarray);
- exit(1);
- }
/*
** Do an iteration of the bitmap test. If the
@@ -83,17 +73,8 @@ DoBitops(void)
** the array space.
*/
bitarray = malloc(ARRAY_SIZE * sizeof(unsigned long));
- if (!bitarray) {
- fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context);
- exit(1);
- }
bitoparray = malloc(bitop_array_size * 2 * sizeof(unsigned long));
- if (!bitoparray) {
- fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context);
- free(bitarray);
- exit(1);
- }
}
/*