40MB of RAM free is 100% normal and even quite good. If you are indeed talking about RAM than you're fine. Most droids will actually have under 10MB of RAM free at any time and lots more RAM used up by a memory cache. However, when the free ram gets low, it garbage collects from the ram cache and thus that becomes available. In looking at a task killer, the free RAM displayed is the sum of the actual free memory PLUS the memory tied up in cache which is considred free, since it can be killed at any time.
On my device, i almost always hover around 30MB total free when looking at Advanced task killer. Any my performance is excellent. Closing apps via a task killer is really not necessary. The OS handles this on it's own.
If you are talking about the actual ROM memory, then you would have to look into your apps installed.