Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ef6d1039
Commit
ef6d1039
authored
Apr 12, 2004
by
Stefan Monnier
Browse files
(__default_morecore): Use bss_sbrk(), not __sbrk(), before Cygwin unexec.
parent
eff27731
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
src/gmalloc.c
src/gmalloc.c
+12
-1
No files found.
src/gmalloc.c
View file @
ef6d1039
...
...
@@ -352,6 +352,10 @@ Cambridge, MA 02139, USA.
#include <errno.h>
/* How to really get more memory. */
#if defined(CYGWIN)
extern
__ptr_t
bss_sbrk
PP
((
ptrdiff_t
__size
));
extern
int
bss_sbrk_did_unexec
;
#endif
__ptr_t
(
*
__morecore
)
PP
((
ptrdiff_t
__size
))
=
__default_morecore
;
/* Debugging hook for `malloc'. */
...
...
@@ -1572,7 +1576,14 @@ __ptr_t
__default_morecore
(
increment
)
__malloc_ptrdiff_t
increment
;
{
__ptr_t
result
=
(
__ptr_t
)
__sbrk
(
increment
);
__ptr_t
result
;
#if defined(CYGWIN)
if
(
!
bss_sbrk_did_unexec
)
{
return
bss_sbrk
(
increment
);
}
#endif
result
=
(
__ptr_t
)
__sbrk
(
increment
);
if
(
result
==
(
__ptr_t
)
-
1
)
return
NULL
;
return
result
;
...
...
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