Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::AllocateGlobsOfMemoryTask Class Reference
Inheritance diagram for dart::AllocateGlobsOfMemoryTask:
dart::ThreadPool::Task dart::IntrusiveDListEntry< Task >

Public Member Functions

 AllocateGlobsOfMemoryTask (IsolateGroup *isolate_group, Monitor *done_monitor, bool *done)
 
virtual void Run ()
 
- Public Member Functions inherited from dart::ThreadPool::Task
virtual ~Task ()
 
virtual void Run ()=0
 
- Public Member Functions inherited from dart::IntrusiveDListEntry< Task >
 IntrusiveDListEntry ()
 
 ~IntrusiveDListEntry ()
 

Additional Inherited Members

- Protected Member Functions inherited from dart::ThreadPool::Task
 Task ()
 

Detailed Description

Definition at line 904 of file thread_test.cc.

Constructor & Destructor Documentation

◆ AllocateGlobsOfMemoryTask()

dart::AllocateGlobsOfMemoryTask::AllocateGlobsOfMemoryTask ( IsolateGroup isolate_group,
Monitor done_monitor,
bool *  done 
)
inline

Definition at line 906 of file thread_test.cc.

909 : isolate_group_(isolate_group),
910 done_monitor_(done_monitor),
911 done_(done) {}
static void done(const char *config, const char *src, const char *srcOptions, const char *name)
Definition: DM.cpp:263

Member Function Documentation

◆ Run()

virtual void dart::AllocateGlobsOfMemoryTask::Run ( )
inlinevirtual

Implements dart::ThreadPool::Task.

Definition at line 913 of file thread_test.cc.

913 {
914 const bool kBypassSafepoint = false;
916 kBypassSafepoint);
917 {
918 Thread* thread = Thread::Current();
919 StackZone stack_zone(thread);
920 Zone* zone = stack_zone.GetZone();
921 int count = 100 * 1000;
922 while (count-- > 0) {
923 String::Handle(zone, String::New("abc"));
924 }
925 }
926 Thread::ExitIsolateGroupAsHelper(kBypassSafepoint);
927 // Tell main thread that we are ready.
928 {
929 MonitorLocker ml(done_monitor_);
930 ASSERT(!*done_);
931 *done_ = true;
932 ml.Notify();
933 }
934 }
int count
Definition: FontMgrTest.cpp:50
static Object & Handle()
Definition: object.h:407
static StringPtr New(const char *cstr, Heap::Space space=Heap::kNew)
Definition: object.cc:23698
@ kUnknownTask
Definition: thread.h:346
static Thread * Current()
Definition: thread.h:362
static void ExitIsolateGroupAsHelper(bool bypass_safepoint)
Definition: thread.cc:499
static bool EnterIsolateGroupAsHelper(IsolateGroup *isolate_group, TaskKind kind, bool bypass_safepoint)
Definition: thread.cc:481
#define ASSERT(E)

The documentation for this class was generated from the following file: