Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 473 | 473 |
| 474 class Heap { | 474 class Heap { |
| 475 public: | 475 public: |
| 476 // Configure heap size before setup. Return false if the heap has been | 476 // Configure heap size before setup. Return false if the heap has been |
| 477 // set up already. | 477 // set up already. |
| 478 bool ConfigureHeap(int max_semispace_size, | 478 bool ConfigureHeap(int max_semispace_size, |
| 479 intptr_t max_old_gen_size, | 479 intptr_t max_old_gen_size, |
| 480 intptr_t max_executable_size); | 480 intptr_t max_executable_size); |
| 481 bool ConfigureHeapDefault(); | 481 bool ConfigureHeapDefault(); |
| 482 | 482 |
| 483 // Initializes the global object heap. If create_heap_objects is true, | 483 // Prepares the heap, setting up memory areas that are needed in the isolate |
| 484 // also creates the basic non-mutable objects. | 484 // without actually actually creating any objects. |
|
Michael Starzinger
2013/02/25 12:00:57
Drop one of the two "actually" in the comment.
danno
2013/02/25 14:25:05
Done.
| |
| 485 bool SetUp(); | |
| 486 | |
| 487 // Bootstraps the object heap with the core set of objects required to run. | |
| 485 // Returns whether it succeeded. | 488 // Returns whether it succeeded. |
| 486 bool SetUp(bool create_heap_objects); | 489 bool CreateHeapObjects(); |
| 487 | 490 |
| 488 // Destroys all memory allocated by the heap. | 491 // Destroys all memory allocated by the heap. |
| 489 void TearDown(); | 492 void TearDown(); |
| 490 | 493 |
| 491 // Set the stack limit in the roots_ array. Some architectures generate | 494 // Set the stack limit in the roots_ array. Some architectures generate |
| 492 // code that looks here, because it is faster than loading from the static | 495 // code that looks here, because it is faster than loading from the static |
| 493 // jslimit_/real_jslimit_ variable in the StackGuard. | 496 // jslimit_/real_jslimit_ variable in the StackGuard. |
| 494 void SetStackLimits(); | 497 void SetStackLimits(); |
| 495 | 498 |
| 496 // Returns whether SetUp has been called. | 499 // Returns whether SetUp has been called. |
| (...skipping 2448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2945 AssertNoAllocation no_alloc; // i.e. no gc allowed. | 2948 AssertNoAllocation no_alloc; // i.e. no gc allowed. |
| 2946 | 2949 |
| 2947 private: | 2950 private: |
| 2948 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2951 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2949 }; | 2952 }; |
| 2950 #endif // DEBUG | 2953 #endif // DEBUG |
| 2951 | 2954 |
| 2952 } } // namespace v8::internal | 2955 } } // namespace v8::internal |
| 2953 | 2956 |
| 2954 #endif // V8_HEAP_H_ | 2957 #endif // V8_HEAP_H_ |
| OLD | NEW |