Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: src/heap/spaces.h

Issue 1159123002: Revert of Clean up aligned allocation code in preparation for SIMD alignments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_SPACES_H_ 5 #ifndef V8_HEAP_SPACES_H_
6 #define V8_HEAP_SPACES_H_ 6 #define V8_HEAP_SPACES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1930 1930
1931 // Expands the space by allocating a fixed number of pages. Returns false if 1931 // Expands the space by allocating a fixed number of pages. Returns false if
1932 // it cannot allocate requested number of pages from OS, or if the hard heap 1932 // it cannot allocate requested number of pages from OS, or if the hard heap
1933 // size limit has been hit. 1933 // size limit has been hit.
1934 bool Expand(); 1934 bool Expand();
1935 1935
1936 // Generic fast case allocation function that tries linear allocation at the 1936 // Generic fast case allocation function that tries linear allocation at the
1937 // address denoted by top in allocation_info_. 1937 // address denoted by top in allocation_info_.
1938 inline HeapObject* AllocateLinearly(int size_in_bytes); 1938 inline HeapObject* AllocateLinearly(int size_in_bytes);
1939 1939
1940 // Generic fast case allocation function that tries aligned linear allocation 1940 // Generic fast case allocation function that tries double aligned linear
1941 // at the address denoted by top in allocation_info_. Writes the aligned 1941 // allocation at the address denoted by top in allocation_info_.
1942 // allocation size, which includes the filler size, to size_in_bytes. 1942 inline HeapObject* AllocateLinearlyAligned(int size_in_bytes,
1943 inline HeapObject* AllocateLinearlyAligned(int* size_in_bytes,
1944 AllocationAlignment alignment); 1943 AllocationAlignment alignment);
1945 1944
1946 // If sweeping is still in progress try to sweep unswept pages. If that is 1945 // If sweeping is still in progress try to sweep unswept pages. If that is
1947 // not successful, wait for the sweeper threads and re-try free-list 1946 // not successful, wait for the sweeper threads and re-try free-list
1948 // allocation. 1947 // allocation.
1949 MUST_USE_RESULT HeapObject* WaitForSweeperThreadsAndRetryAllocation( 1948 MUST_USE_RESULT HeapObject* WaitForSweeperThreadsAndRetryAllocation(
1950 int size_in_bytes); 1949 int size_in_bytes);
1951 1950
1952 // Slow path of AllocateRaw. This function is space-dependent. 1951 // Slow path of AllocateRaw. This function is space-dependent.
1953 MUST_USE_RESULT HeapObject* SlowAllocateRaw(int size_in_bytes); 1952 MUST_USE_RESULT HeapObject* SlowAllocateRaw(int size_in_bytes);
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 count = 0; 2890 count = 0;
2892 } 2891 }
2893 // Must be small, since an iteration is used for lookup. 2892 // Must be small, since an iteration is used for lookup.
2894 static const int kMaxComments = 64; 2893 static const int kMaxComments = 64;
2895 }; 2894 };
2896 #endif 2895 #endif
2897 } 2896 }
2898 } // namespace v8::internal 2897 } // namespace v8::internal
2899 2898
2900 #endif // V8_HEAP_SPACES_H_ 2899 #endif // V8_HEAP_SPACES_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698