mirror of https://gitee.com/bigwinds/arangodb
visual studio
This commit is contained in:
parent
04a1be577f
commit
2870a9f10f
|
@ -60,7 +60,7 @@ void V8PlatformFeature::collectOptions(
|
||||||
options->addHiddenOption("--javascript.v8-options", "options to pass to v8",
|
options->addHiddenOption("--javascript.v8-options", "options to pass to v8",
|
||||||
new VectorParameter<StringParameter>(&_v8Options));
|
new VectorParameter<StringParameter>(&_v8Options));
|
||||||
|
|
||||||
options->addOption("--javascript.v8-max-heap", "maximal heap size",
|
options->addOption("--javascript.v8-max-heap", "maximal heap size (in MB)",
|
||||||
new UInt64Parameter(&_v8MaxHeap));
|
new UInt64Parameter(&_v8MaxHeap));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,6 +75,13 @@ void V8PlatformFeature::validateOptions(
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (0 < _v8MaxHeap) {
|
||||||
|
if (_v8MaxHeap > (std::numeric_limits<int>::max)()) {
|
||||||
|
LOG(FATAL) << "value for '--javascript.v8-max-heap' exceeds maximum value " << (std::numeric_limits<int>::max)();
|
||||||
|
FATAL_ERROR_EXIT();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void V8PlatformFeature::start() {
|
void V8PlatformFeature::start() {
|
||||||
|
@ -160,7 +167,7 @@ v8::Isolate* V8PlatformFeature::createIsolate() {
|
||||||
createParams.array_buffer_allocator = _allocator.get();
|
createParams.array_buffer_allocator = _allocator.get();
|
||||||
|
|
||||||
if (0 < _v8MaxHeap) {
|
if (0 < _v8MaxHeap) {
|
||||||
createParams.constraints.set_max_old_space_size(_v8MaxHeap);
|
createParams.constraints.set_max_old_space_size(static_cast<int>(_v8MaxHeap));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto isolate = v8::Isolate::New(createParams);
|
auto isolate = v8::Isolate::New(createParams);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
namespace {
|
namespace {
|
||||||
template <typename DurationT, typename ReprT = typename DurationT::rep>
|
template <typename DurationT, typename ReprT = typename DurationT::rep>
|
||||||
constexpr DurationT maxDuration() noexcept {
|
constexpr DurationT maxDuration() noexcept {
|
||||||
return DurationT{std::numeric_limits<ReprT>::max()};
|
return DurationT{(std::numeric_limits<ReprT>::max)()};
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename DurationT>
|
template <typename DurationT>
|
||||||
|
|
|
@ -170,7 +170,7 @@ class HybridLogicalClock {
|
||||||
|
|
||||||
static signed char decodeTable[256];
|
static signed char decodeTable[256];
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue