diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32heap.h | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/w32heap.h b/src/w32heap.h index ae18fd81df7..2ff02205772 100644 --- a/src/w32heap.h +++ b/src/w32heap.h | |||
| @@ -26,6 +26,9 @@ Boston, MA 02111-1307, USA. | |||
| 26 | 26 | ||
| 27 | #include <windows.h> | 27 | #include <windows.h> |
| 28 | 28 | ||
| 29 | #define ROUND_UP(p, align) (((DWORD)(p) + (align)-1) & ~((align)-1)) | ||
| 30 | #define ROUND_DOWN(p, align) ((DWORD)(p) & ~((align)-1)) | ||
| 31 | |||
| 29 | /* | 32 | /* |
| 30 | * Heap related stuff. | 33 | * Heap related stuff. |
| 31 | */ | 34 | */ |
| @@ -41,10 +44,9 @@ Boston, MA 02111-1307, USA. | |||
| 41 | 44 | ||
| 42 | extern unsigned char *get_data_start(); | 45 | extern unsigned char *get_data_start(); |
| 43 | extern unsigned char *get_data_end(); | 46 | extern unsigned char *get_data_end(); |
| 44 | extern unsigned long data_region_size; | ||
| 45 | extern unsigned long reserved_heap_size; | 47 | extern unsigned long reserved_heap_size; |
| 46 | extern SYSTEM_INFO sysinfo_cache; | 48 | extern SYSTEM_INFO sysinfo_cache; |
| 47 | extern BOOL need_to_recreate_heap; | 49 | extern BOOL using_dynamic_heap; |
| 48 | extern int w32_major_version; | 50 | extern int w32_major_version; |
| 49 | extern int w32_minor_version; | 51 | extern int w32_minor_version; |
| 50 | 52 | ||
| @@ -58,28 +60,15 @@ extern int os_subtype; | |||
| 58 | /* Emulation of Unix sbrk(). */ | 60 | /* Emulation of Unix sbrk(). */ |
| 59 | extern void *sbrk (unsigned long size); | 61 | extern void *sbrk (unsigned long size); |
| 60 | 62 | ||
| 61 | /* Recreate the heap created during dumping. */ | 63 | /* Initialize heap structures for sbrk on startup. */ |
| 62 | extern void recreate_heap (char *executable_path); | 64 | extern void init_heap (); |
| 63 | 65 | ||
| 64 | /* Round the heap to this size. */ | 66 | /* Round the heap to this size. */ |
| 65 | extern void round_heap (unsigned long size); | 67 | extern void round_heap (unsigned long size); |
| 66 | 68 | ||
| 67 | /* Load in the dumped .bss section. */ | ||
| 68 | extern void read_in_bss (char *name); | ||
| 69 | |||
| 70 | /* Map in the dumped heap. */ | ||
| 71 | extern void map_in_heap (char *name); | ||
| 72 | |||
| 73 | /* Cache system info, e.g., the NT page size. */ | 69 | /* Cache system info, e.g., the NT page size. */ |
| 74 | extern void cache_system_info (void); | 70 | extern void cache_system_info (void); |
| 75 | 71 | ||
| 76 | /* Round ADDRESS up to be aligned with ALIGN. */ | ||
| 77 | extern unsigned char *round_to_next (unsigned char *address, | ||
| 78 | unsigned long align); | ||
| 79 | |||
| 80 | /* Report a fatal error during dumped heap management. */ | ||
| 81 | void w32_fatal_reload_error (char *step); | ||
| 82 | |||
| 83 | /* ----------------------------------------------------------------- */ | 72 | /* ----------------------------------------------------------------- */ |
| 84 | /* Useful routines for manipulating memory-mapped files. */ | 73 | /* Useful routines for manipulating memory-mapped files. */ |
| 85 | 74 | ||
| @@ -104,8 +93,6 @@ int open_input_file (file_data *p_file, char *name); | |||
| 104 | int open_output_file (file_data *p_file, char *name, unsigned long size); | 93 | int open_output_file (file_data *p_file, char *name, unsigned long size); |
| 105 | void close_file_data (file_data *p_file); | 94 | void close_file_data (file_data *p_file); |
| 106 | 95 | ||
| 107 | unsigned long get_section_size (PIMAGE_SECTION_HEADER p_section); | ||
| 108 | |||
| 109 | /* Return pointer to section header for named section. */ | 96 | /* Return pointer to section header for named section. */ |
| 110 | IMAGE_SECTION_HEADER * find_section (char * name, IMAGE_NT_HEADERS * nt_header); | 97 | IMAGE_SECTION_HEADER * find_section (char * name, IMAGE_NT_HEADERS * nt_header); |
| 111 | 98 | ||