We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
we use mmap map the whole file, and ret->data is only part of the file without ETHASH_DAG_MAGIC_NUM
static bool ethash_mmap(struct ethash_full* ret, FILE* f) { int fd; char* mmapped_data; errno = 0; ret->file = f; if ((fd = ethash_fileno(ret->file)) == -1) { return false; } mmapped_data= mmap( NULL, (size_t)ret->file_size + ETHASH_DAG_MAGIC_NUM_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 ); if (mmapped_data == MAP_FAILED) { return false; } ret->data = (node*)(mmapped_data + ETHASH_DAG_MAGIC_NUM_SIZE); return true; }
finally we munmap the address only begin with ret->data, then munmap(..) != 0
munmap(full->data, (size_t)full->file_size);
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
we use mmap map the whole file, and ret->data is only part of the file without ETHASH_DAG_MAGIC_NUM
finally we munmap the address only begin with ret->data, then munmap(..) != 0
The text was updated successfully, but these errors were encountered: