// File: /workspace/github_cpp_makefile_star2_O1/MingYueRuYa[P]cprimeprimecode/memory_manager.cpp
// Function: custom_allocator::test_custom_allocator()
void test_custom_allocator()
{
	cout << "Foo size:" << sizeof(Foo) << endl;

	Foo  *fooarray[100];
	for (int i=0; i<13; ++i) {
		fooarray[i] = new Foo();
	}

	cout << "Goo size:" << sizeof(Foo) << endl;
	Goo  *gooarray[100];
	for (int i=0; i<13; ++i) {
		gooarray[i] = new Goo();
	}

	cout << "Hoo size:" << sizeof(Foo) << endl;
	Hoo  *hooarray[100];
	for (int i=0; i<13; ++i) {
		hooarray[i] = new Hoo();
	}

//result:
	//	Foo size:4
	//	address:0x1b17008
	//	address:0x1b1700c
	//	address:0x1b17010
	//	address:0x1b17014
	//	address:0x1b17018
	//	address:0x1b17020
	//	address:0x1b17024
	//	address:0x1b17028
	//	address:0x1b1702c
	//	address:0x1b17030
	//	address:0x1b17038
	//	address:0x1b1703c
	//	address:0x1b17040
	//	Goo size:4
	//	address:0x1b17050
	//	address:0x1b17054
	//	address:0x1b17058
	//	address:0x1b1705c
	//	address:0x1b17060
	//	address:0x1b17068
	//	address:0x1b1706c
	//	address:0x1b17070
	//	address:0x1b17074
	//	address:0x1b17078
	//	address:0x1b17080
	//	address:0x1b17084
	//	address:0x1b17088
	//	Hoo size:4
	//	address:0x1b17098
	//	address:0x1b1709c
	//	address:0x1b170a0
	//	address:0x1b170a4
	//	address:0x1b170a8
	//	address:0x1b170b0
	//	address:0x1b170b4
	//	address:0x1b170b8
	//	address:0x1b170bc
	//	address:0x1b170c0
	//	address:0x1b170c8
	//	address:0x1b170cc
	//	address:0x1b170d0
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x47fe(%rip), %rbx      # 0x7fd0
leaq 0x1ae5(%rip), %rsi      # 0x52be
movl $0x9, %edx
movq %rbx, %rdi
callq 0x21a0
movl $0x4, %esi
movq %rbx, %rdi
callq 0x20c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movl $0xd, %r15d
leaq 0x494e(%rip), %rbx      # 0x8178
movl $0x4, %esi
movq %rbx, %rdi
callq 0x46da
movq %rax, %r14
movq %rax, %rdi
callq 0x4322
decl %r15d
jne 0x382a
movq 0x4782(%rip), %rbx      # 0x7fd0
leaq 0x1a73(%rip), %rsi      # 0x52c8
movl $0x9, %edx
movq %rbx, %rdi
callq 0x21a0
movl $0x4, %esi
movq %rbx, %rdi
callq 0x20c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movl $0xd, %r15d
leaq 0x48e2(%rip), %rbx      # 0x8188
movl $0x4, %esi
movq %rbx, %rdi
callq 0x46da
movq %rax, %r14
movq %rax, %rdi
callq 0x4386
decl %r15d
jne 0x38a6
movq 0x4706(%rip), %rbx      # 0x7fd0
leaq 0x1a01(%rip), %rsi      # 0x52d2
movl $0x9, %edx
movq %rbx, %rdi
callq 0x21a0
movl $0x4, %esi
movq %rbx, %rdi
callq 0x20c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movl $0xd, %r15d
leaq 0x4876(%rip), %rbx      # 0x8198
movl $0x4, %esi
movq %rbx, %rdi
callq 0x46da
movq %rax, %r14
movq %rax, %rdi
callq 0x43ea
decl %r15d
jne 0x3922
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x484f(%rip), %rcx      # 0x81a0
movq %rcx, (%r14)
movq %r14, 0x4845(%rip)      # 0x81a0
jmp 0x3981
movq 0x482c(%rip), %rcx      # 0x8190
movq %rcx, (%r14)
movq %r14, 0x4822(%rip)      # 0x8190
jmp 0x3981
movq 0x4809(%rip), %rcx      # 0x8180
movq %rcx, (%r14)
movq %r14, 0x47ff(%rip)      # 0x8180
movq %rax, %rdi
callq 0x2250