aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/w32heap.h25
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
42extern unsigned char *get_data_start(); 45extern unsigned char *get_data_start();
43extern unsigned char *get_data_end(); 46extern unsigned char *get_data_end();
44extern unsigned long data_region_size;
45extern unsigned long reserved_heap_size; 47extern unsigned long reserved_heap_size;
46extern SYSTEM_INFO sysinfo_cache; 48extern SYSTEM_INFO sysinfo_cache;
47extern BOOL need_to_recreate_heap; 49extern BOOL using_dynamic_heap;
48extern int w32_major_version; 50extern int w32_major_version;
49extern int w32_minor_version; 51extern int w32_minor_version;
50 52
@@ -58,28 +60,15 @@ extern int os_subtype;
58/* Emulation of Unix sbrk(). */ 60/* Emulation of Unix sbrk(). */
59extern void *sbrk (unsigned long size); 61extern void *sbrk (unsigned long size);
60 62
61/* Recreate the heap created during dumping. */ 63/* Initialize heap structures for sbrk on startup. */
62extern void recreate_heap (char *executable_path); 64extern void init_heap ();
63 65
64/* Round the heap to this size. */ 66/* Round the heap to this size. */
65extern void round_heap (unsigned long size); 67extern void round_heap (unsigned long size);
66 68
67/* Load in the dumped .bss section. */
68extern void read_in_bss (char *name);
69
70/* Map in the dumped heap. */
71extern 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. */
74extern void cache_system_info (void); 70extern void cache_system_info (void);
75 71
76/* Round ADDRESS up to be aligned with ALIGN. */
77extern unsigned char *round_to_next (unsigned char *address,
78 unsigned long align);
79
80/* Report a fatal error during dumped heap management. */
81void 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);
104int open_output_file (file_data *p_file, char *name, unsigned long size); 93int open_output_file (file_data *p_file, char *name, unsigned long size);
105void close_file_data (file_data *p_file); 94void close_file_data (file_data *p_file);
106 95
107unsigned 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. */
110IMAGE_SECTION_HEADER * find_section (char * name, IMAGE_NT_HEADERS * nt_header); 97IMAGE_SECTION_HEADER * find_section (char * name, IMAGE_NT_HEADERS * nt_header);
111 98