proxygen
StackOverflow.cpp File Reference

Go to the source code of this file.

Functions

void f (int *p)
 
int main (int argc, char *argv[])
 

Function Documentation

void f ( int *  p)

Definition at line 20 of file StackOverflow.cpp.

References a, and i.

Referenced by main().

20  {
21  // Make sure recursion is not optimized out
22  int a[100];
23  for (size_t i = 0; i < 100; ++i) {
24  a[i] = i;
25  ++(a[i]);
26  if (p) {
27  a[i] += p[i];
28  }
29  }
30  f(a);
31 }
void f(int *p)
char a
int main ( int  argc,
char *  argv[] 
)

Definition at line 33 of file StackOverflow.cpp.

References folly::fibers::FiberManager::addTask(), f(), folly::fibers::getFiberManager(), folly::init(), and folly::EventBase::loop().

33  {
34  folly::init(&argc, &argv);
35 
36  folly::EventBase evb;
37  folly::fibers::getFiberManager(evb).addTask([&]() { f(nullptr); });
38  evb.loop();
39 }
void f(int *p)
void init(int *argc, char ***argv, bool removeFlags)
Definition: Init.cpp:34
char ** argv
FiberManager & getFiberManager(EventBase &evb, const FiberManager::Options &opts)