summaryrefslogtreecommitdiff
path: root/init_global_static_roots.cpp
blob: a39b3807bbfa5db0e441c2c1a834e83909d63bf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

// INCLUDE FILES
#include <e32def.h>

#include <gc.h>
#include <gcconfig.h>

#include "init_global_static_roots.h"

#ifdef __cplusplus
extern "C" {
#endif


void init_global_static_roots()
{
	ptr_t dataStart = NULL;
	ptr_t dataEnd = NULL;	
	#if defined (__WINS__)
		extern int winscw_data_start, winscw_data_end;
		dataStart = ((ptr_t)&winscw_data_start);
		dataEnd   = ((ptr_t)&winscw_data_end);		
	#else
	    extern int Image$$RW$$Limit[], Image$$RW$$Base[];
	    dataStart = ((ptr_t)Image$$RW$$Base);
	    dataEnd   = ((ptr_t)Image$$RW$$Limit);	    			
	#endif //__WINS__	
	
	GC_add_roots(dataStart, dataEnd); 

}


#ifdef __cplusplus
	}
#endif