Skip to content

Commit

Permalink
1163
Browse files Browse the repository at this point in the history
  • Loading branch information
ErosBryant committed Jan 16, 2024
1 parent 4527c18 commit 39b44ee
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions NVM/global.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,32 @@ size_t nvm_use = 0L;
long long nvm_total = 0L;
long long ops_num = 0L;


void NvmNodeSizeInit(const Options& options_) {
nvm_node = options_.nvm_node;
nvm_next_node = options_.nvm_next_node;
long tmp;
numa_node_size(nvm_node, &tmp);
nvm_free_space = (size_t)tmp - 16L * 1024 * 1024 * 1024;


long long tmp_ll;
long tmp_l;

#ifdef ENVIRONMENT_REQUIRES_LONG_LONG
numa_node_size(nvm_node, &tmp_ll);
nvm_free_space = static_cast<size_t>(tmp_ll) - 16L * 1024 * 1024 * 1024;
#else
numa_node_size(nvm_node, &tmp_l);
nvm_free_space = static_cast<size_t>(tmp_l) - 16L * 1024 * 1024 * 1024;
#endif
}



// void NvmNodeSizeInit(const Options& options_) {
// nvm_node = options_.nvm_node;
// nvm_next_node = options_.nvm_next_node;
// long tmp;
// numa_node_size(nvm_node, &tmp);
// nvm_free_space = (size_t)tmp - 16L * 1024 * 1024 * 1024;
// }

void nvmn_size_delete(size_t s) {
nvm_use-=s;
}
Expand Down

0 comments on commit 39b44ee

Please sign in to comment.