Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
709fd16b
Commit
709fd16b
authored
May 11, 1996
by
Geoff Voelker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(allocate_heap): Bump heap base up to 27MB to
wsatisfy Win95.
parent
f885e95c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
src/w32heap.c
src/w32heap.c
+21
-10
No files found.
src/w32heap.c
View file @
709fd16b
...
@@ -131,20 +131,31 @@ allocate_heap (void)
...
@@ -131,20 +131,31 @@ allocate_heap (void)
size could be roughly double, so if we allow 4MB for the executable
size could be roughly double, so if we allow 4MB for the executable
we will have plenty of room for expansion.
we will have plenty of room for expansion.
Thus we set the malloc heap base to 20MB. Since Emacs now leaves
Thus we would like to set the malloc heap base to 20MB. However,
Win95 refuses to allocate the heap starting at this address, so we
set the base to 27MB to make it happy. Since Emacs now leaves
28 bits available for pointers, this lets us use the remainder of
28 bits available for pointers, this lets us use the remainder of
the region below the 256MB line for our malloc arena - 2
36
MB is
the region below the 256MB line for our malloc arena - 2
29
MB is
still a pretty decent arena to play in! */
still a pretty decent arena to play in!
*/
unsigned
long
base
=
0x01
4
00000
;
/*
20
MB */
unsigned
long
base
=
0x01
B
00000
;
/*
27
MB */
unsigned
long
end
=
1
<<
VALBITS
;
/* 256MB */
unsigned
long
end
=
1
<<
VALBITS
;
/* 256MB */
void
*
ptr
=
NULL
;
reserved_heap_size
=
end
-
base
;
#ifdef NTHEAP_PROBE_BASE
while
(
!
ptr
&&
(
base
<
end
))
return
VirtualAlloc
((
void
*
)
base
,
{
get_reserved_heap_size
(),
#endif
MEM_RESERVE
,
reserved_heap_size
=
end
-
base
;
PAGE_NOACCESS
);
ptr
=
VirtualAlloc
((
void
*
)
base
,
get_reserved_heap_size
(),
MEM_RESERVE
,
PAGE_NOACCESS
);
#ifdef NTHEAP_PROBE_BASE
base
+=
0x00100000
;
/* 1MB increment */
}
#endif
return
ptr
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment