OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 // memory is allocated from the code range. If a code range exists | 562 // memory is allocated from the code range. If a code range exists |
563 // and the freed memory is in it, the code range manages the freed memory. | 563 // and the freed memory is in it, the code range manages the freed memory. |
564 static void* AllocateRawMemory(const size_t requested, | 564 static void* AllocateRawMemory(const size_t requested, |
565 size_t* allocated, | 565 size_t* allocated, |
566 Executability executable); | 566 Executability executable); |
567 static void FreeRawMemory(void* buf, | 567 static void FreeRawMemory(void* buf, |
568 size_t length, | 568 size_t length, |
569 Executability executable); | 569 Executability executable); |
570 static void PerformAllocationCallback(ObjectSpace space, | 570 static void PerformAllocationCallback(ObjectSpace space, |
571 AllocationAction action, | 571 AllocationAction action, |
572 int size); | 572 size_t size); |
573 | 573 |
574 static void AddMemoryAllocationCallback(MemoryAllocationCallback callback, | 574 static void AddMemoryAllocationCallback(MemoryAllocationCallback callback, |
575 ObjectSpace space, | 575 ObjectSpace space, |
576 AllocationAction action); | 576 AllocationAction action); |
577 static void RemoveMemoryAllocationCallback( | 577 static void RemoveMemoryAllocationCallback( |
578 MemoryAllocationCallback callback); | 578 MemoryAllocationCallback callback); |
579 static bool MemoryAllocationCallbackRegistered( | 579 static bool MemoryAllocationCallbackRegistered( |
580 MemoryAllocationCallback callback); | 580 MemoryAllocationCallback callback); |
581 | 581 |
582 // Returns the maximum available bytes of heaps. | 582 // Returns the maximum available bytes of heaps. |
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2250 | 2250 |
2251 private: | 2251 private: |
2252 LargeObjectChunk* current_; | 2252 LargeObjectChunk* current_; |
2253 HeapObjectCallback size_func_; | 2253 HeapObjectCallback size_func_; |
2254 }; | 2254 }; |
2255 | 2255 |
2256 | 2256 |
2257 } } // namespace v8::internal | 2257 } } // namespace v8::internal |
2258 | 2258 |
2259 #endif // V8_SPACES_H_ | 2259 #endif // V8_SPACES_H_ |
OLD | NEW |