Inline RosAlloc::Alloc().
Bug: 9986565
Change-Id: I9bc411b8ae39379f9d730f40974857a585405fde
diff --git a/runtime/gc/allocator/rosalloc.h b/runtime/gc/allocator/rosalloc.h
index c81306f..d5b6de1 100644
--- a/runtime/gc/allocator/rosalloc.h
+++ b/runtime/gc/allocator/rosalloc.h
@@ -345,6 +345,12 @@
// runs for the rest.
static const size_t kMaxThreadLocalSizeBracketIdx = 10;
+ // If true, check that the returned memory is actually zero.
+ static constexpr bool kCheckZeroMemory = kIsDebugBuild;
+
+ // If true, log verbose details of operations.
+ static constexpr bool kTraceRosAlloc = false;
+
struct hash_run {
size_t operator()(const RosAlloc::Run* r) const {
return reinterpret_cast<size_t>(r);
@@ -429,6 +435,9 @@
// The internal of non-bulk Free().
void FreeInternal(Thread* self, void* ptr) LOCKS_EXCLUDED(lock_);
+ // Allocates large objects.
+ void* AllocLargeObject(Thread* self, size_t size, size_t* bytes_allocated) LOCKS_EXCLUDED(lock_);
+
public:
RosAlloc(void* base, size_t capacity);
void* Alloc(Thread* self, size_t size, size_t* bytes_allocated)