MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / clone_reader

Function clone_reader

libCacheSim/traceReader/reader.c:536–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534}
535
536reader_t *clone_reader(const reader_t *const reader_in) {
537 reader_t *reader = setup_reader(reader_in->trace_path, reader_in->trace_type,
538 &reader_in->init_params);
539 reader->n_total_req = reader_in->n_total_req;
540
541 if (reader->trace_format != TXT_TRACE_FORMAT) {
542 munmap(reader->mapped_file, reader->file_size);
543 reader->mapped_file = reader_in->mapped_file;
544 }
545 reader->cloned = true;
546 return reader;
547}
548
549int close_reader(reader_t *const reader) {
550 /* close the file in the reader or unmmap the memory in the file

Callers 5

test_reader_more2Function · 0.85
_simulateFunction · 0.85
get_num_of_reqFunction · 0.85
lcs_print_trace_statFunction · 0.85
generate_mini_mrcFunction · 0.85

Calls 1

setup_readerFunction · 0.85

Tested by 1

test_reader_more2Function · 0.68