#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <sys/time.h>
#include <numa.h>
#include <sys/mman.h>
Classes | |
union | node |
Defines | |
#define | _GNU_SOURCE 1 |
#define | FRACT_NODES 8 |
#define | FRACT_MASKS 32 |
#define | LOOPS 10 |
#define | H(t) (((double)msize) / ((double)t)) |
#define | D3 delim,delim,delim |
Enumerations | |
enum | { CACHELINESIZE = 64 } |
enum | test { MEMSET = 0, MEMCPY, FORWARD, BACKWARD, PTRCHASE } |
Functions | |
static void | clearcache (void *a, unsigned size) |
void | output (char *title, char *result) |
void * | alloc (size_t size) |
void * | alloc_local (size_t size) |
void * | alloc_interleaved (size_t size) |
void * | alloc_interleaved_subset (size_t size, struct bitmask *nodemask) |
void * | alloc_onnode (size_t size, int node) |
void | alloc_free (void *ptr, size_t size) |
static int | cmp_node (const void *ap, const void *bp) |
void ** | ptrchase_init (unsigned char *mem) |
static unsigned long long | timerfold (struct timeval *tv) |
void | memtest (char *name, unsigned char *mem) |
int | popcnt (unsigned long val) |
void | test (enum test type) |
void | usage (void) |
long | memsize (char *s) |
int | main (int ac, char **av) |
Variables | |
int | fract_nodes |
unsigned long | msize |
enum test | thistest |
char * | delim = " " |
int | force |
int | regression_testing = 0 |
char * | testname [] |
int | max_node |
#define _GNU_SOURCE 1 |
#define FRACT_MASKS 32 |
#define FRACT_NODES 8 |
#define H | ( | t | ) | (((double)msize) / ((double)t)) |
#define LOOPS 10 |
enum test |
void* alloc | ( | size_t | size | ) |
void alloc_free | ( | void * | ptr, | |
size_t | size | |||
) |
void* alloc_interleaved | ( | size_t | size | ) |
void* alloc_interleaved_subset | ( | size_t | size, | |
struct bitmask * | nodemask | |||
) |
void* alloc_local | ( | size_t | size | ) |
void* alloc_onnode | ( | size_t | size, | |
int | node | |||
) |
static void clearcache | ( | void * | a, | |
unsigned | size | |||
) | [inline, static] |
static int cmp_node | ( | const void * | ap, | |
const void * | bp | |||
) | [static] |
int main | ( | int | ac, | |
char ** | av | |||
) |
long memsize | ( | char * | s | ) |
void memtest | ( | char * | name, | |
unsigned char * | mem | |||
) |
void output | ( | char * | title, | |
char * | result | |||
) |
int popcnt | ( | unsigned long | val | ) |
void** ptrchase_init | ( | unsigned char * | mem | ) |
static unsigned long long timerfold | ( | struct timeval * | tv | ) | [inline, static] |
void usage | ( | void | ) |
char* delim = " " |
int force |
int fract_nodes |
int max_node |
unsigned long msize |
int regression_testing = 0 |
char* testname[] |
{ "memset", "memcpy", "forward", "backward", "ptrchase", NULL, }