First round of comments.
https://codereview.chromium.org/68203003/diff/30001/src/defaults.cc
File src/defaults.cc (right):
https://codereview.chromium.org/68203003/diff/30001/src/defaults.cc#newcode40
src/defaults.cc:40: #if V8_OS_ANDROID
Move the #if into the function below to reduce its scope
(http://refactoring.com/catalog/reduceScopeOfVariable.html).
Furthermore, I think that directly defining 2 limits is much clearer
than the slightly cryptic kOsHasSwap:
#if V8_OS_ANDROID
const uint64_t limit1 = 768ul * i::MB;
const uint64_t limit2 = 1ul * i::GB;
#else
...
#endif
Feel free to choose something better than the names "limit1" and
"limit2".
https://codereview.chromium.org/68203003/diff/30001/src/defaults.cc#newcode49
src/defaults.cc:49: if (constraints == NULL) {
This looks strange and a bit ugly: Why do we need a NULL check here and
what is the return value used for? It looks like the caller shouldn't
have called this if there are no constraints.
I propose to return void and make the whole function a member function
of ResourceConstraints under a more suitable name like
"ConfigureDefaults".
https://codereview.chromium.org/68203003/diff/30001/src/defaults.cc#newcode53
src/defaults.cc:53: int lump_of_memory = (i::kPointerSize / 4) * i::MB;
const
https://codereview.chromium.org/68203003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.