Thanks Sven. PTAL.
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
On 2013/11/12 07:45:03, Sven Panne wrote:
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".
Done (defined three names for consistency).
https://codereview.chromium.org/68203003/diff/30001/src/defaults.cc#newcode49
src/defaults.cc:49: if (constraints == NULL) {
On 2013/11/12 07:45:03, Sven Panne wrote:
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".
I like the idea of making the function a member of ResourceConstraints,
but there was previously push-back on having this be part of v8.h. I've
made the change here but: (i) is there agreement now that this can be
part of v8.h; and (ii) should we add the implementation to api.cc and
remove the whole defaults.cc file in this case?
https://codereview.chromium.org/68203003/diff/30001/src/defaults.cc#newcode53
src/defaults.cc:53: int lump_of_memory = (i::kPointerSize / 4) * i::MB;
On 2013/11/12 07:45:03, Sven Panne wrote:
const
Done.
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.