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
memory_map_handle memory_map::create_memory_map(const bq::file_handle& map_file, const size_t offset, const size_t size) { memory_map_handle result; if (!map_file.is_valid()) { result.error_code_ = EBADF; bq::util::log_device_console_plain_text(log_level::error, "create_memory_map with invalid map_file"); return result; } auto fd = map_file.platform_handle(); auto current_size = lseek(fd, 0, SEEK_END); // alignment size_t alignment_offset = offset % __memory_map_size_unit; ...... }
__memory_map_size_unit is defined as global static variable, which leads to static initialization order fiasco
static initialization order fiasco
The text was updated successfully, but these errors were encountered:
fkxingkong
Successfully merging a pull request may close this issue.
memory_map_handle memory_map::create_memory_map(const bq::file_handle& map_file, const size_t offset, const size_t size)
{
memory_map_handle result;
if (!map_file.is_valid()) {
result.error_code_ = EBADF;
bq::util::log_device_console_plain_text(log_level::error, "create_memory_map with invalid map_file");
return result;
}
auto fd = map_file.platform_handle();
auto current_size = lseek(fd, 0, SEEK_END);
// alignment
size_t alignment_offset = offset % __memory_map_size_unit;
......
}
__memory_map_size_unit is defined as global static variable, which leads to
static initialization order fiasco
The text was updated successfully, but these errors were encountered: