assuming that some_class is trivial enough, would the new operator call alloca instead of malloc
Probably not. The new'ed object has to stick around until it's deleted, which might be long after the calling function returned and popped the stack. There might be some cases where the compiler knows that the object is deleted when the function returns and could therefore make this optimization, but I don't know if any of them do.