diff --git a/libgen/loadgen.cc b/libgen/loadgen.cc index acea649..836ecdb 100644 --- a/libgen/loadgen.cc +++ b/libgen/loadgen.cc @@ -70,9 +70,11 @@ memload_generator::worker_thrd(void *_tinfo) tinfo->opts->buffer_size) { cur_offset = 0; } - - memcpy((char *)from_buffer + cur_offset, - (char *)to_buffer + cur_offset, + // for (uint i = 0; i < tinfo->opts->transaction_size; i++) { + // ((char *)to_buffer)[cur_offset + i] = ((char *)from_buffer)[cur_offset + i]; + // } + memcpy((char *)to_buffer + cur_offset, + (char *)from_buffer + cur_offset, tinfo->opts->transaction_size); tinfo->num_trans.fetch_add(1); diff --git a/libnms/alloc.c b/libnms/alloc.c index e5db9a9..8b29e21 100644 --- a/libnms/alloc.c +++ b/libnms/alloc.c @@ -70,7 +70,7 @@ nms_alloc_static(int node_id, size_t sz) return NULL; } - if ((region = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_ANON | MAP_ALIGNED_SUPER | MAP_NOCORE | MAP_PRIVATE | MAP_NOSYNC | MAP_PREFAULT_READ, -1, 0)) == MAP_FAILED) { + if ((region = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_ANON | MAP_ALIGNED_SUPER | MAP_NOCORE | MAP_PRIVATE | MAP_PREFAULT_READ, -1, 0)) == MAP_FAILED) { fprintf(stderr, "libnms: mmap failed with %d\n", errno); return NULL; }