comparison src/ntheap.c @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 84b14dcb0985
children abe6d1db359e
comparison
equal deleted inserted replaced
439:357dd071b03c 440:8de8e3f6228a
36 36
37 /* These are defined to get Emacs to compile, but are not used. */ 37 /* These are defined to get Emacs to compile, but are not used. */
38 int edata; 38 int edata;
39 int etext; 39 int etext;
40 40
41 /* The major and minor versions of NT. */
42 int nt_major_version;
43 int nt_minor_version;
44
45 /* Distinguish between Windows NT and Windows 95. */
46 int os_subtype;
47
48 /* Cache information describing the NT system for later use. */ 41 /* Cache information describing the NT system for later use. */
49 void 42 void
50 cache_system_info (void) 43 cache_system_info (void)
51 { 44 {
52 union
53 {
54 struct info
55 {
56 char major;
57 char minor;
58 short platform;
59 } info;
60 DWORD data;
61 } version;
62
63 /* Cache the version of the operating system. */
64 version.data = GetVersion ();
65 nt_major_version = version.info.major;
66 nt_minor_version = version.info.minor;
67
68 if (version.info.platform & 0x8000)
69 os_subtype = OS_WIN95;
70 else
71 os_subtype = OS_NT;
72
73 /* Cache page size, allocation unit, processor type, etc. */ 45 /* Cache page size, allocation unit, processor type, etc. */
74 GetSystemInfo (&sysinfo_cache); 46 GetSystemInfo (&sysinfo_cache);
75 syspage_mask = sysinfo_cache.dwPageSize - 1; 47 syspage_mask = sysinfo_cache.dwPageSize - 1;
76 } 48 }
77 49
246 } 218 }
247 219
248 return result; 220 return result;
249 } 221 }
250 222
251 #if !defined (CANNOT_DUMP) && !defined(HEAP_IN_DATA) 223 #if !defined (CANNOT_DUMP) && !defined(HEAP_IN_DATA) && !defined(PDUMP)
252 224
253 /* Recreate the heap from the data that was dumped to the executable. 225 /* Recreate the heap from the data that was dumped to the executable.
254 EXECUTABLE_PATH tells us where to find the executable. */ 226 EXECUTABLE_PATH tells us where to find the executable. */
255 void 227 void
256 recreate_heap (char *executable_path) 228 recreate_heap (char *executable_path)