/[gcl]/gcl/o/unexnt.c
ViewVC logotype

Diff of /gcl/o/unexnt.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by mjthomas, Mon Jan 13 04:48:08 2003 UTC revision 1.11 by mjthomas, Fri Jul 11 06:28:32 2003 UTC
# Line 36  Boston, MA 02111-1307, USA. Line 36  Boston, MA 02111-1307, USA.
36  #include "cyglacks.h"  #include "cyglacks.h"
37  #endif  #endif
38    
39    #if 0
40    #ifdef __MINGW32__
41    #  define SEPARATE_BSS_SECTION
42    #endif
43    #endif
44    
45    extern sigint();
46    
47  /* Include relevant definitions from IMAGEHLP.H, which can be found  /* Include relevant definitions from IMAGEHLP.H, which can be found
48     in \\win32sdk\mstools\samples\image\include\imagehlp.h. */     in \\win32sdk\mstools\samples\image\include\imagehlp.h. */
49    
# Line 132  _start (void) Line 140  _start (void)
140  {  {
141    extern void mainCRTStartup (void);    extern void mainCRTStartup (void);
142    
143  #if 0  #if 1
144    /* Give us a way to debug problems with crashes on startup when    /* Give us a way to debug problems with crashes on startup when
145       running under the MSVC profiler. */       running under the MSVC profiler. */
146    if (GetEnvironmentVariable ("EMACS_DEBUG", NULL, 0) > 0)    if (GetEnvironmentVariable ("EMACS_DEBUG", NULL, 0) > 0)
# Line 701  dump_bss_and_heap (file_data *p_infile, Line 709  dump_bss_and_heap (file_data *p_infile,
709      printf ("\t0x%p BSS start in process.\n", bss_data);      printf ("\t0x%p BSS start in process.\n", bss_data);
710      printf ("\t0x%08lx BSS offset in executable.\n", index);      printf ("\t0x%08lx BSS offset in executable.\n", index);
711      printf ("\t0x%08lx BSS size in bytes.\n", size);      printf ("\t0x%08lx BSS size in bytes.\n", size);
712        printf ("\t0x%08lx file base.\n", p_outfile->file_base );
713        printf ("\t0x%08lx file base + index.\n", p_outfile->file_base + index );
714      memcpy ((char *) p_outfile->file_base + index, bss_data, size);      memcpy ((char *) p_outfile->file_base + index, bss_data, size);
715  }  }
716    
# Line 740  read_in_bss (char *filename) Line 750  read_in_bss (char *filename)
750        i = GetLastError ();        i = GetLastError ();
751        exit (1);        exit (1);
752      }      }
753        printf ("\t0x%p BSS start in memory.\n", bss_start);
754        printf ("\t0x%08lx BSS offset in saved executable.\n", index);
755        printf ("\t0x%08lx BSS size in bytes.\n", bss_size);
756        printf ("\t0x%08lx bytes read.\n", n_read);
757    
758    CloseHandle (file);    CloseHandle (file);
759  }  }
# Line 775  map_in_heap (char *filename) Line 789  map_in_heap (char *filename)
789    file_base = MapViewOfFileEx (file_mapping, FILE_MAP_COPY, 0,    file_base = MapViewOfFileEx (file_mapping, FILE_MAP_COPY, 0,
790                                 heap_index_in_executable, size,                                 heap_index_in_executable, size,
791                                 get_heap_start ());                                 get_heap_start ());
792        printf ("\t0x%p Heap start in memory.\n", get_heap_start() );
793        printf ("\t0x%08lx Heap offset in executable.\n", heap_index_in_executable);
794        printf ("\t0x%08lx Heap size in bytes.\n", size);
795        printf ("\t0x%08lx file base.\n", file_base);
796    
797    if (file_base != 0)    if (file_base != 0)
798      {      {
799        return;        return;
# Line 953  allocate_heap (void) Line 972  allocate_heap (void)
972       the region below the 256MB line for our malloc arena - 229MB is       the region below the 256MB line for our malloc arena - 229MB is
973       still a pretty decent arena to play in!  */       still a pretty decent arena to play in!  */
974    
975    #if 0
976    unsigned long base = DBEGIN;   /*  27MB */    unsigned long base = DBEGIN;   /*  27MB */
977    /*   unsigned long base = 0x01B00000; */  /*  27MB */  #else  
978      unsigned long base = 0x10100000 /*0x01B00000*/;  /*  27MB */
979    #endif  
980    unsigned long end  = 1 << VALBITS; /* 256MB */    unsigned long end  = 1 << VALBITS; /* 256MB */
981    void *ptr = NULL;    void *ptr = NULL;
982    
# Line 979  allocate_heap (void) Line 1001  allocate_heap (void)
1001                        MEM_RESERVE,                        MEM_RESERVE,
1002                        PAGE_NOACCESS);                        PAGE_NOACCESS);
1003    DBEGIN = (DBEGIN_TY) ptr;    DBEGIN = (DBEGIN_TY) ptr;
1004      base = DBEGIN;
1005  #endif  #endif
1006    
1007    return ptr;    return ptr;

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26