aboutsummaryrefslogtreecommitdiffstats
path: root/src/ralloc.c
diff options
context:
space:
mode:
authorKenichi Handa2012-07-17 07:09:08 +0900
committerKenichi Handa2012-07-17 07:09:08 +0900
commit8c536f15bf95916d56bb50495d22b7da7e09fff9 (patch)
treeac6f8bf5103bdbd1d6a75f05def9bc7aa9e96547 /src/ralloc.c
parent21a8caaa4af24f258e6c7f80c1fc913b00aee044 (diff)
parentc05cf3902ae658cc8bf413124245c9e1cdcca2d7 (diff)
downloademacs-8c536f15bf95916d56bb50495d22b7da7e09fff9.tar.gz
emacs-8c536f15bf95916d56bb50495d22b7da7e09fff9.zip
merge trunk
Diffstat (limited to 'src/ralloc.c')
-rw-r--r--src/ralloc.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/ralloc.c b/src/ralloc.c
index 4bb2f240438..19d15664eec 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -31,9 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
31 31
32#include <unistd.h> 32#include <unistd.h>
33 33
34typedef POINTER_TYPE *POINTER;
35typedef size_t SIZE;
36
37#ifdef DOUG_LEA_MALLOC 34#ifdef DOUG_LEA_MALLOC
38#define M_TOP_PAD -2 35#define M_TOP_PAD -2
39extern int mallopt (int, int); 36extern int mallopt (int, int);
@@ -47,9 +44,6 @@ extern size_t __malloc_extra_blocks;
47 44
48#include <stddef.h> 45#include <stddef.h>
49 46
50typedef size_t SIZE;
51typedef void *POINTER;
52
53#include <unistd.h> 47#include <unistd.h>
54#include <malloc.h> 48#include <malloc.h>
55 49
@@ -58,6 +52,8 @@ typedef void *POINTER;
58 52
59#include "getpagesize.h" 53#include "getpagesize.h"
60 54
55typedef size_t SIZE;
56typedef void *POINTER;
61#define NIL ((POINTER) 0) 57#define NIL ((POINTER) 0)
62 58
63/* A flag to indicate whether we have initialized ralloc yet. For 59/* A flag to indicate whether we have initialized ralloc yet. For
@@ -1143,6 +1139,17 @@ r_alloc_reset_variable (POINTER *old, POINTER *new)
1143 bloc->variable = new; 1139 bloc->variable = new;
1144} 1140}
1145 1141
1142void
1143r_alloc_inhibit_buffer_relocation (int inhibit)
1144{
1145 if (use_relocatable_buffers < 0)
1146 use_relocatable_buffers = 0;
1147 if (inhibit)
1148 use_relocatable_buffers++;
1149 else if (use_relocatable_buffers > 0)
1150 use_relocatable_buffers--;
1151}
1152
1146 1153
1147/*********************************************************************** 1154/***********************************************************************
1148 Initialization 1155 Initialization