Added test case for proper buddy free system. Fixed typecast compiler warning.