Index: trunk/abdev/BasicCompiler32/MakePeHdr.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/MakePeHdr.cpp	(revision 222)
+++ trunk/abdev/BasicCompiler32/MakePeHdr.cpp	(revision 223)
@@ -1053,11 +1053,4 @@
 
 
-	/////////////////////////////
-	// GC用の変数スケジュール
-	/////////////////////////////
-	PerformedGcVarSchedule();
-
-
-
 	////////////////////////////
 	// エクスポート情報の再配置
Index: trunk/abdev/BasicCompiler64/MakePeHdr.cpp
===================================================================
--- trunk/abdev/BasicCompiler64/MakePeHdr.cpp	(revision 222)
+++ trunk/abdev/BasicCompiler64/MakePeHdr.cpp	(revision 223)
@@ -1057,10 +1057,4 @@
 
 
-	/////////////////////////////
-	// GC用の変数スケジュール
-	/////////////////////////////
-	PerformedGcVarSchedule();
-
-
 	////////////////////////////
 	// エクスポート情報の再配置
Index: trunk/abdev/BasicCompiler_Common/PESchedule.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/PESchedule.cpp	(revision 222)
+++ trunk/abdev/BasicCompiler_Common/PESchedule.cpp	(revision 223)
@@ -25,9 +25,4 @@
 	length=0;
 	NowPageRVAToReloc=0;
-
-	pdwData_CodeSection=(DWORD *)HeapAlloc(hHeap,0,1);
-	iNum_CodeSection=0;
-	pdwData_DataSection=(DWORD *)HeapAlloc(hHeap,0,1);
-	iNum_DataSection=0;
 }
 CReloc::~CReloc(){
@@ -39,7 +34,4 @@
 		buffer=0;
 	}
-
-	HeapDefaultFree(pdwData_CodeSection);
-	HeapDefaultFree(pdwData_DataSection);
 }
 void CReloc::copy(CReloc *por){
@@ -57,11 +49,7 @@
 	NowCountAddrToReloc=por->NowCountAddrToReloc;
 
-	iNum_CodeSection=por->iNum_CodeSection;
-	pdwData_CodeSection=(DWORD *)HeapAlloc(hHeap,0,iNum_CodeSection*sizeof(DWORD));
-	memcpy(pdwData_CodeSection,por->pdwData_CodeSection,iNum_CodeSection*sizeof(DWORD));
-
-	iNum_DataSection=por->iNum_DataSection;
-	pdwData_DataSection=(DWORD *)HeapAlloc(hHeap,0,iNum_DataSection*sizeof(DWORD));
-	memcpy(pdwData_DataSection,por->pdwData_DataSection,iNum_DataSection*sizeof(DWORD));
+	codeSectionAddresses = por->codeSectionAddresses;
+
+	dataSectionAddresses = por->dataSectionAddresses;
 }
 
@@ -70,7 +58,5 @@
 	if(!bDll) return;
 
-	pdwData_CodeSection=(DWORD *)HeapReAlloc(hHeap,0,pdwData_CodeSection,(iNum_CodeSection+1)*sizeof(DWORD));
-	pdwData_CodeSection[iNum_CodeSection]=addr;
-	iNum_CodeSection++;
+	codeSectionAddresses.push_back( addr );
 }
 void CReloc::AddSchedule_DataSection(DWORD addr){
@@ -78,7 +64,5 @@
 	if(!bDll) return;
 
-	pdwData_DataSection=(DWORD *)HeapReAlloc(hHeap,0,pdwData_DataSection,(iNum_DataSection+1)*sizeof(DWORD));
-	pdwData_DataSection[iNum_DataSection]=addr;
-	iNum_DataSection++;
+	dataSectionAddresses.push_back( addr );
 }
 
@@ -136,13 +120,14 @@
 	NowPageRVAToReloc=0;
 
-	int i;
-	for(i=0;i<iNum_CodeSection;i++){
+	BOOST_FOREACH( DWORD addr, codeSectionAddresses )
+	{
 		extern int MemPos_CodeSection;
-		__add(MemPos_CodeSection + pdwData_CodeSection[i]);
-	}
-
-	for(i=0;i<iNum_DataSection;i++){
+		__add(MemPos_CodeSection + addr);
+	}
+
+	BOOST_FOREACH( DWORD addr, dataSectionAddresses )
+	{
 		extern int MemPos_DataSection;
-		__add(MemPos_DataSection + pdwData_DataSection[i]);
+		__add(MemPos_DataSection + addr);
 	}
 }
Index: trunk/abdev/BasicCompiler_Common/PESchedule.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/PESchedule.h	(revision 222)
+++ trunk/abdev/BasicCompiler_Common/PESchedule.h	(revision 223)
@@ -22,12 +22,10 @@
 
 private:
-	DWORD *pdwData_CodeSection;
-	int iNum_CodeSection;
+	std::vector<DWORD> codeSectionAddresses;
 public:
 	void AddSchedule_CodeSection(DWORD addr);
 
 private:
-	DWORD *pdwData_DataSection;
-	int iNum_DataSection;
+	std::vector<DWORD> dataSectionAddresses;
 public:
 	void AddSchedule_DataSection(DWORD addr);
Index: trunk/abdev/BasicCompiler_Common/common.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/common.h	(revision 222)
+++ trunk/abdev/BasicCompiler_Common/common.h	(revision 223)
@@ -389,5 +389,4 @@
 //gc.cpp
 void InitGCVariables(void);
-void PerformedGcVarSchedule(void);
 
 
Index: trunk/abdev/BasicCompiler_Common/gc.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/gc.cpp	(revision 222)
+++ trunk/abdev/BasicCompiler_Common/gc.cpp	(revision 223)
@@ -9,52 +9,8 @@
 #endif
 
-int Schedule_GlobalRoot_StartPtr;
-int Schedule_GlobalRoot_Size;
-
 void InitGCVariables(void){
 	char temporary[255];
-
-
-	///////////////////////////////
-	// グローバル変数の開始位置
-	///////////////////////////////
-
-	sprintf(temporary,"_System_gc_GlobalRoot_StartPtr%c%cVoidPtr",1,ESC_AS);
-	OpcodeDim(temporary,0);
-
 	Type type;
 	RELATIVE_VAR RelativeVar;
-	GetVarOffsetReadWrite("_System_gc_GlobalRoot_StartPtr",&RelativeVar,type);
-
-	//mov rax,ptr
-	op_mov_RV(PTR_SIZE,REG_RAX,0);
-	Schedule_GlobalRoot_StartPtr=obp-sizeof(long);
-
-	//mov ptr[offset],rax/eax
-	op_mov_MR(PTR_SIZE,REG_RAX,0,(int)RelativeVar.offset,MOD_DISP32);
-	obp-=sizeof(long);
-	pobj_GlobalVarSchedule->add();
-	obp+=sizeof(long);
-
-
-	///////////////////////////////
-	// グローバル変数の大きさ
-	///////////////////////////////
-
-	sprintf(temporary,"_System_gc_GlobalRoot_Size%c%cLong",1,ESC_AS);
-	OpcodeDim(temporary,0);
-
-	GetVarOffsetReadWrite("_System_gc_GlobalRoot_Size",&RelativeVar,type);
-
-	//mov rax,ptr
-	op_mov_RV(PTR_SIZE,REG_RAX,0);
-	Schedule_GlobalRoot_Size=obp-sizeof(long);
-
-	//mov ptr[offset],rax/eax
-	op_mov_MR(PTR_SIZE,REG_RAX,0,(int)RelativeVar.offset,MOD_DISP32);
-	obp-=sizeof(long);
-	pobj_GlobalVarSchedule->add();
-	obp+=sizeof(long);
-
 
 
@@ -78,15 +34,2 @@
 
 }
-
-void PerformedGcVarSchedule(void){
-	//グローバル変数領域の開始位置
-	extern DWORD ImageBase;
-	extern int MemPos_RWSection;
-	*((long *)(OpBuffer+Schedule_GlobalRoot_StartPtr))=ImageBase+MemPos_RWSection;
-	pobj_Reloc->AddSchedule_CodeSection(Schedule_GlobalRoot_StartPtr);
-
-	//グローバル変数領域のサイズ
-	extern int AllInitGlobalVarSize;
-	extern int AllGlobalVarSize;
-	*((long *)(OpBuffer+Schedule_GlobalRoot_Size))=AllInitGlobalVarSize+AllGlobalVarSize;
-}
