The link that MrKyoo posted will help significantly. There is an app called MaxMem that does the same thing, it may be easier for you to fo.
Also, take a look at these links.
Why is my BlackBerry losing its call logs or message logs? - BlackBerryFAQ
How do I free up memory on my device? - BlackBerryFAQ