comparison runtime/internal/memory.d @ 894:77a3d6945f81

Don't use /proc/self/map for finding the static data segment on x86-64 for now. Probably breaks shared libraries. Parsing the file needs to be rewritten!
author Christian Kamm <kamm incasoftware de>
date Mon, 19 Jan 2009 19:34:51 +0100
parents aa953cc960b6
children 23d36edea021
comparison
equal deleted inserted replaced
893:e74e2e53ba3b 894:77a3d6945f81
28 version = GC_Use_Dynamic_Ranges; 28 version = GC_Use_Dynamic_Ranges;
29 29
30 // does Posix suffice? 30 // does Posix suffice?
31 version(Posix) 31 version(Posix)
32 { 32 {
33 version = GC_Use_Data_Proc_Maps; 33 //FIXME: proc map parsing is too naive to work on x86-64
34 version(X86)
35 {
36 version = GC_Use_Data_Proc_Maps;
37 }
34 } 38 }
35 39
36 version(GC_Use_Data_Proc_Maps) 40 version(GC_Use_Data_Proc_Maps)
37 { 41 {
38 version(Posix) {} else { 42 version(Posix) {} else {
276 dataEnd = adjust_down( &Data_End ); 280 dataEnd = adjust_down( &Data_End );
277 } 281 }
278 else version( GC_Use_Data_Proc_Maps ) 282 else version( GC_Use_Data_Proc_Maps )
279 { 283 {
280 // TODO: Exclude zero-mapped regions 284 // TODO: Exclude zero-mapped regions
285 //FIXME: proc map parsing is too naive to work on x86-64
281 286
282 int fd = open("/proc/self/maps", O_RDONLY); 287 int fd = open("/proc/self/maps", O_RDONLY);
283 ptrdiff_t count; // %% need to configure ret for read.. 288 ptrdiff_t count; // %% need to configure ret for read..
284 char buf[2024]; 289 char buf[2024];
285 char* p; 290 char* p;