add test_malloc

Add a test to consecutively fill up all available memory and free it again.