Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7c9cd446
Commit
7c9cd446
authored
Feb 26, 1999
by
Andreas Schwab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(main) [DOUG_LEA_MALLOC]: Work around a bug in glibc's
malloc.
parent
53fe786d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
src/emacs.c
src/emacs.c
+10
-0
No files found.
src/emacs.c
View file @
7c9cd446
...
...
@@ -103,6 +103,9 @@ void *malloc_state_ptr;
extern
void
*
malloc_get_state
();
/* From glibc, a routine that overwrites the malloc internal state. */
extern
void
malloc_set_state
();
/* Non-zero if the MALLOC_CHECK_ enviroment variable was set while
dumping. Used to work around a bug in glibc's malloc. */
int
malloc_using_checking
;
#endif
/* Variable whose value is symbol giving operating system type. */
...
...
@@ -565,9 +568,16 @@ main (argc, argv, envp)
#ifdef DOUG_LEA_MALLOC
if
(
initialized
)
{
if
(
!
malloc_using_checking
)
/* Work around a bug in glibc's malloc. MALLOC_CHECK_ must be
ignored if the heap to be restored was constructed without
malloc checking. */
unsetenv
(
"MALLOC_CHECK_"
);
malloc_set_state
(
malloc_state_ptr
);
free
(
malloc_state_ptr
);
}
else
malloc_using_checking
=
getenv
(
"MALLOC_CHECK_"
)
!=
NULL
;
#endif
#ifdef RUN_TIME_REMAP
...
...
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