Allocate stuff larger than the stack itself.
-
-
-
Ah!!
End of conversation
New conversation -
-
-
yea, you can just allocate a big block of memory once and initialize N things into it without any allocation or copying. afaik, that is the primary use case
-
In C++, new / placement new are ~equivalent to: // new A() mem = malloc(sizeof(A)) a = A::A(mem) // call constructor // new(buf) A() a = A::A(buf) // just a function call
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.