Introduce >2GB compatible PR 1424 from fdkekin0
This commit is contained in:
+12
-2
@@ -13,11 +13,14 @@
|
||||
bool Xtc::load() {
|
||||
LOG_DBG("XTC", "Loading XTC: %s", filepath.c_str());
|
||||
|
||||
// Ensure the per-book cache exists before the parser tries to create page_table.bin.
|
||||
setupCacheDir();
|
||||
|
||||
// Initialize parser
|
||||
parser.reset(new xtc::XtcParser());
|
||||
|
||||
// Open XTC file
|
||||
xtc::XtcError err = parser->open(filepath.c_str());
|
||||
// Open XTC file and initialize its cache-backed page table
|
||||
xtc::XtcError err = parser->open(filepath.c_str(), cachePath.c_str());
|
||||
if (err != xtc::XtcError::OK) {
|
||||
LOG_ERR("XTC", "Failed to load: %s", xtc::errorToString(err));
|
||||
parser.reset();
|
||||
@@ -619,3 +622,10 @@ xtc::XtcError Xtc::getLastError() const {
|
||||
}
|
||||
return parser->getLastError();
|
||||
}
|
||||
|
||||
void Xtc::prefetchPages(uint32_t pageIndex) const {
|
||||
if (!loaded || !parser) {
|
||||
return;
|
||||
}
|
||||
parser->prefetchWindow(pageIndex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user