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
49efed3a
Commit
49efed3a
authored
Oct 04, 2005
by
Richard M. Stallman
Browse files
(refill_memory_reserve): Conditionalize the body, not the function's existence.
parent
8973af16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
src/alloc.c
src/alloc.c
+15
-14
No files found.
src/alloc.c
View file @
49efed3a
...
...
@@ -547,6 +547,21 @@ DEFUN ("memory-full-p", Fmemory_full_p, Smemory_full_p, 0, 0, 0,
return (spare_memory ? Qnil : Qt);
}
/* If we released our reserve (due to running out of memory),
and we have a fair amount free once again,
try to set aside another reserve in case we run out once more.
This is called when a relocatable block is freed in ralloc.c. */
void
refill_memory_reserve ()
{
#ifndef SYSTEM_MALLOC
if (spare_memory == 0)
spare_memory = (char *) malloc ((size_t) SPARE_MEMORY);
#endif
}
/* Called if we can't allocate relocatable space for a buffer. */
void
...
...
@@ -1134,20 +1149,6 @@ allocate_buffer ()
#ifndef SYSTEM_MALLOC
/* If we released our reserve (due to running out of memory),
and we have a fair amount free once again,
try to set aside another reserve in case we run out once more.
This is called when a relocatable block is freed in ralloc.c. */
void
refill_memory_reserve ()
{
if (spare_memory == 0)
spare_memory = (char *) malloc ((size_t) SPARE_MEMORY);
}
/* Arranging to disable input signals while we're in malloc.
This only works with GNU malloc. To help out systems which can't
...
...
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