Verify that we have enough memory if cache_memory is set
This commit is contained in:
parent
6d47c686df
commit
8c1c0296ed
|
@ -1488,6 +1488,11 @@ int main(int argc, char* argv[]) {
|
|||
// evictionPolicyStringToEnum will throw an exception if the string is not recognized as a valid
|
||||
EvictablePageCache::evictionPolicyStringToEnum(flowKnobs->CACHE_EVICTION_POLICY);
|
||||
|
||||
if (memLimit < FLOW_KNOBS->PAGE_CACHE_4K + (2LL<<30)) {
|
||||
fprintf(stderr, "ERROR: --memory has to be at least 2GiB larger than --cache_memory\n");
|
||||
flushAndExit(FDB_EXIT_ERROR);
|
||||
}
|
||||
|
||||
if (role == SkipListTest) {
|
||||
skipListTest();
|
||||
flushAndExit(FDB_EXIT_SUCCESS);
|
||||
|
|
Loading…
Reference in New Issue