minor fix
This commit is contained in:
parent
59b8c36ced
commit
1a90104d53
@ -70,9 +70,11 @@ memload_generator::worker_thrd(void *_tinfo)
|
|||||||
tinfo->opts->buffer_size) {
|
tinfo->opts->buffer_size) {
|
||||||
cur_offset = 0;
|
cur_offset = 0;
|
||||||
}
|
}
|
||||||
|
// for (uint i = 0; i < tinfo->opts->transaction_size; i++) {
|
||||||
memcpy((char *)from_buffer + cur_offset,
|
// ((char *)to_buffer)[cur_offset + i] = ((char *)from_buffer)[cur_offset + i];
|
||||||
(char *)to_buffer + cur_offset,
|
// }
|
||||||
|
memcpy((char *)to_buffer + cur_offset,
|
||||||
|
(char *)from_buffer + cur_offset,
|
||||||
tinfo->opts->transaction_size);
|
tinfo->opts->transaction_size);
|
||||||
tinfo->num_trans.fetch_add(1);
|
tinfo->num_trans.fetch_add(1);
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ nms_alloc_static(int node_id, size_t sz)
|
|||||||
return NULL;
|
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);
|
fprintf(stderr, "libnms: mmap failed with %d\n", errno);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user