One strip of SRAM
The Uno's ATmega328P has 2 KB of SRAM: 2,048 bytes at addresses 0x0100 to 0x08FF. Every variable lives here. Three users share it: globals at the bottom, the heap above them, and the stack coming down from the top.
readings is a global: declared outside any function, it lives for the whole run. An int is 2 bytes, so 400 of them take 800 bytes, from 0x0100 to 0x041F. That space is reserved before setup() runs.
The stack
The stack starts at the top, 0x08FF, and grows down. Calling report() pushes a frame: the 2-byte return address plus its local array line, 200 bytes. The stack pointer, SP, drops at least 202 bytes, to 0x0835.
When report() returns, SP moves back up to 0x08FF and those 202 bytes are free again. A local lives only while its function runs. The stack cleans up after itself, with no code from you.
The heap
malloc(200) asks for memory while the sketch runs. It comes from the heap, which starts right after the globals, at 0x0420. A 2-byte size header goes in front, so a uses 202 bytes. Then b uses 102. The heap top climbs to 0x0550.
free(a) gives its 202 bytes back, but b still sits above them, so the heap cannot shrink. Then malloc(300) needs 302 bytes: too big for the hole, so it goes on top. The heap top climbs to 0x067E. Unusable holes like this are fragmentation.
When they meet
Free memory is the gap between the heap top, 0x067E, and the stack at the top: 642 bytes. The heap grows up into it and the stack grows down into it. Nothing in the chip keeps them apart.
Suppose loop() now asked for malloc(700): 702 bytes. avr-libc will not grow the heap within 32 bytes of the stack, so malloc returns NULL, a pointer to nothing. Always check the result before you use it.
smooth() declares int window[400]: 800 bytes. Its frame needs at least 802, but only 642 are free. SP drops to 0x05DD and the frame silently overwrites the top 160 bytes of c. No error: values change, and the sketch may crash.
Keep big arrays out of functions, avoid malloc() in loop(), and check what malloc() returns. Wrap fixed text in F(), as in Serial.print(F("Hi")), so it stays in flash instead of being copied into SRAM at start-up.
What happens
;; step 1/10 · sram SRAM 2,048 bytes 0x0100 .. 0x08FF bottom globals (fixed when the sketch is built) above heap (grows up: malloc) top stack (grows down: function calls) below 0x0100: the chip's registers, not your memory
The picture puts readings at 0x0100. In a real build the Arduino core adds a few globals of its own (for example, the counters behind millis()) and the linker decides the exact order, so readings may start a few bytes later. Initialised globals (.data) come first, then zeroed ones (.bss), then the heap. A frame is at least the return address plus the locals. The compiler may also save registers on the stack, so real frames are a little bigger. loop() and main() keep a few bytes on the stack too, so the true free space is slightly less than 642 bytes. We assume report() and smooth() really use their arrays; an unused local can be removed by the compiler.