namespace collector { class MarkSweep;
} // namespace collector
namespace space {
// An alloc space implemented using a runs-of-slots memory allocator. Not final as may be // overridden by a MemoryToolMallocSpace. class RosAllocSpace : public MallocSpace { public: // Create a RosAllocSpace with the requested sizes. The requested // base address is not guaranteed to be granted, if it is required, // the caller should call Begin on the returned space to confirm the // request was granted. static RosAllocSpace* Create(const std::string& name,
size_t initial_size,
size_t growth_limit,
size_t capacity, bool low_memory_mode, bool can_move_objects); static RosAllocSpace* CreateFromMemMap(MemMap&& mem_map, const std::string& name,
size_t starting_size,
size_t initial_size,
size_t growth_limit,
size_t capacity, bool low_memory_mode, bool can_move_objects);
// Returns true if the given allocation request can be allocated in // an existing thread local run without allocating a new run.
ALWAYS_INLINE bool CanAllocThreadLocal(Thread* self, size_t num_bytes); // Allocate the given allocation request in an existing thread local // run without allocating a new run.
ALWAYS_INLINE mirror::Object* AllocThreadLocal(Thread* self, size_t num_bytes,
size_t* bytes_allocated);
size_t MaxBytesBulkAllocatedFor(size_t num_bytes) override { return MaxBytesBulkAllocatedForNonvirtual(num_bytes);
}
ALWAYS_INLINE size_t MaxBytesBulkAllocatedForNonvirtual(size_t num_bytes);
// TODO: NO_THREAD_SAFETY_ANALYSIS because SizeOf() requires that mutator_lock is held. template<bool kMaybeIsRunningOnMemoryTool>
size_t AllocationSizeNonvirtual(mirror::Object* obj, size_t* usable_size)
NO_THREAD_SAFETY_ANALYSIS;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.