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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 static bool CreateApiObjects(); | 814 static bool CreateApiObjects(); |
815 | 815 |
816 // Attempt to find the number in a small cache. If we finds it, return | 816 // Attempt to find the number in a small cache. If we finds it, return |
817 // the string representation of the number. Otherwise return undefined. | 817 // the string representation of the number. Otherwise return undefined. |
818 static Object* GetNumberStringCache(Object* number); | 818 static Object* GetNumberStringCache(Object* number); |
819 | 819 |
820 // Update the cache with a new number-string pair. | 820 // Update the cache with a new number-string pair. |
821 static void SetNumberStringCache(Object* number, String* str); | 821 static void SetNumberStringCache(Object* number, String* str); |
822 | 822 |
823 // Entries in the cache. Must be a power of 2. | 823 // Entries in the cache. Must be a power of 2. |
824 static const int kNumberStringCacheSize = 16*KB; | 824 static const int kNumberStringCacheSize = 64; |
825 | 825 |
826 // Adjusts the amount of registered external memory. | 826 // Adjusts the amount of registered external memory. |
827 // Returns the adjusted value. | 827 // Returns the adjusted value. |
828 static inline int AdjustAmountOfExternalAllocatedMemory(int change_in_bytes); | 828 static inline int AdjustAmountOfExternalAllocatedMemory(int change_in_bytes); |
829 | 829 |
830 // Allocate unitialized fixed array (pretenure == NON_TENURE). | 830 // Allocate unitialized fixed array (pretenure == NON_TENURE). |
831 static Object* AllocateRawFixedArray(int length); | 831 static Object* AllocateRawFixedArray(int length); |
832 | 832 |
833 // True if we have reached the allocation limit in the old generation that | 833 // True if we have reached the allocation limit in the old generation that |
834 // should force the next GC (caused normally) to be a full one. | 834 // should force the next GC (caused normally) to be a full one. |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1673 | 1673 |
1674 // To speed up scavenge collections new space string are kept | 1674 // To speed up scavenge collections new space string are kept |
1675 // separate from old space strings. | 1675 // separate from old space strings. |
1676 static List<Object*> new_space_strings_; | 1676 static List<Object*> new_space_strings_; |
1677 static List<Object*> old_space_strings_; | 1677 static List<Object*> old_space_strings_; |
1678 }; | 1678 }; |
1679 | 1679 |
1680 } } // namespace v8::internal | 1680 } } // namespace v8::internal |
1681 | 1681 |
1682 #endif // V8_HEAP_H_ | 1682 #endif // V8_HEAP_H_ |
OLD | NEW |