aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2025-02-01 12:21:51 +0200
committerEli Zaretskii2025-02-01 12:21:51 +0200
commit22ab03e155adc4df0623e3ee9c2cc56a228e148a (patch)
treed6d6a1eeafb57c7ea3c05460c116c99d514f0cb0 /src
parenta001202b993cf0ef59c46d15fe3f1a011493ad9c (diff)
downloademacs-22ab03e155adc4df0623e3ee9c2cc56a228e148a.tar.gz
emacs-22ab03e155adc4df0623e3ee9c2cc56a228e148a.zip
; Avoid compiler warnings in the MS-Windows build
* src/w32heap.c: Remove unused variables, to avoid compilation warnings. This removes variables that were used only in the unexec build.
Diffstat (limited to 'src')
-rw-r--r--src/w32heap.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/w32heap.c b/src/w32heap.c
index 2ba36f01751..f767e5781bf 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -89,51 +89,6 @@ typedef struct _RTL_HEAP_PARAMETERS {
89/* Info for keeping track of our dynamic heap used after dumping. */ 89/* Info for keeping track of our dynamic heap used after dumping. */
90unsigned char *data_region_base = NULL; 90unsigned char *data_region_base = NULL;
91unsigned char *data_region_end = NULL; 91unsigned char *data_region_end = NULL;
92static DWORD_PTR committed = 0;
93
94/* The maximum block size that can be handled by a non-growable w32
95 heap is limited by the MaxBlockSize value below.
96
97 This point deserves an explanation.
98
99 The W32 heap allocator can be used for a growable heap or a
100 non-growable one.
101
102 A growable heap is not compatible with a fixed base address for the
103 heap. Only a non-growable one is. One drawback of non-growable
104 heaps is that they can hold only objects smaller than a certain
105 size (the one defined below). Most of the larger blocks are GC'ed
106 before dumping. In any case, and to be safe, we implement a simple
107 first-fit allocation algorithm starting at the end of the
108 dumped_data[] array as depicted below:
109
110 ----------------------------------------------
111 | | | |
112 | Private heap |-> <-| Big chunks |
113 | | | |
114 ----------------------------------------------
115 ^ ^ ^
116 dumped_data dumped_data bc_limit
117 + committed
118
119*/
120
121/* Info for managing our preload heap, which is essentially a fixed size
122 data area in the executable. */
123#define PAGE_SIZE 0x1000
124#define MaxBlockSize (0x80000 - PAGE_SIZE)
125
126#define MAX_BLOCKS 0x40
127
128static struct
129{
130 unsigned char *address;
131 size_t size;
132 DWORD occupied;
133} blocks[MAX_BLOCKS];
134
135static DWORD blocks_number = 0;
136static unsigned char *bc_limit;
137 92
138/* Handle for the private heap: 93/* Handle for the private heap:
139 - inside the dumped_data[] array before dump with unexec, 94 - inside the dumped_data[] array before dump with unexec,