When you execute code inside a DLL the code is executed in the context of your process and on the thread that is calling and, in that way, memory is allocated in your process space.
The implementation of the DLL can of course span new threads or new processes. In the latter case the memory allocation will take place in the new forked process.
That means when 1.exe executes the DLL all memory allocated (including the stack) goes to your process memory space (i.e. if the DLL allocates 1 GB of memory then it will reflect in your process memory consumption).