added graph cut and unit-test

Use sg_malloc?