mmap/32-1: add \n in the end of output

Add \n in the end of output to tidy up the output.

Signed-off-by: Yan Lei <yanl.fnst@cn.fujitsu.com>
Reviewed-by: Caspar Zhang <caspar@casparzhang.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
mm/lib: rewrote create_same_memory()

create_same_memory() was too large and contained lots of duplicated codes,
and it's a little hard-coding, so that it's not easy to read and
extend it for new case.

I splited it for five sub-functions:

  ksm_child_memset();
  create_ksm_child();
  stop_ksm_children();
  resume_ksm_children();
  create_smae_memory();

Also I intruduced a data struct to control the mergeable data:

  struct ksm_merge_data {
        char data;
        int mergeable_size;
  };

Signed-off-by: Zhouping Liu <zliu@redhat.com>
Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
mm/include: removed the global var 'memory'

we don't use the global var 'memory' any more,
so removed it, and changed local var 'memory_new'
as 'memory'.

Signed-off-by: Zhouping Liu <zliu@redhat.com>
Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>