Mercurial > emacs
comparison src/ralloc.c @ 88155:d7ddb3e565de
sync with trunk
| author | Henrik Enberg <henrik.enberg@telia.com> |
|---|---|
| date | Mon, 16 Jan 2006 00:03:54 +0000 |
| parents | 23a1cea22d13 |
| children |
comparison
equal
deleted
inserted
replaced
| 88154:8ce476d3ba36 | 88155:d7ddb3e565de |
|---|---|
| 1 /* Block-relocating memory allocator. | 1 /* Block-relocating memory allocator. |
| 2 Copyright (C) 1993, 1995, 2000 Free Software Foundation, Inc. | 2 Copyright (C) 1993, 1995, 2000, 2002, 2003, 2004, |
| 3 2005 Free Software Foundation, Inc. | |
| 3 | 4 |
| 4 This file is part of GNU Emacs. | 5 This file is part of GNU Emacs. |
| 5 | 6 |
| 6 GNU Emacs is free software; you can redistribute it and/or modify | 7 GNU Emacs is free software; you can redistribute it and/or modify |
| 7 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
| 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 GNU General Public License for more details. | 15 GNU General Public License for more details. |
| 15 | 16 |
| 16 You should have received a copy of the GNU General Public License | 17 You should have received a copy of the GNU General Public License |
| 17 along with GNU Emacs; see the file COPYING. If not, write to | 18 along with GNU Emacs; see the file COPYING. If not, write to |
| 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 Boston, MA 02111-1307, USA. */ | 20 Boston, MA 02110-1301, USA. */ |
| 20 | 21 |
| 21 /* NOTES: | 22 /* NOTES: |
| 22 | 23 |
| 23 Only relocate the blocs necessary for SIZE in r_alloc_sbrk, | 24 Only relocate the blocs necessary for SIZE in r_alloc_sbrk, |
| 24 rather than all of them. This means allowing for a possible | 25 rather than all of them. This means allowing for a possible |
| 26 | 27 |
| 27 #ifdef emacs | 28 #ifdef emacs |
| 28 | 29 |
| 29 #include <config.h> | 30 #include <config.h> |
| 30 #include "lisp.h" /* Needed for VALBITS. */ | 31 #include "lisp.h" /* Needed for VALBITS. */ |
| 32 #include "blockinput.h" | |
| 31 | 33 |
| 32 #ifdef HAVE_UNISTD_H | 34 #ifdef HAVE_UNISTD_H |
| 33 #include <unistd.h> | 35 #include <unistd.h> |
| 34 #endif | 36 #endif |
| 35 | 37 |
| 1253 | 1255 |
| 1254 extra_bytes = ROUNDUP (50000); | 1256 extra_bytes = ROUNDUP (50000); |
| 1255 #endif | 1257 #endif |
| 1256 | 1258 |
| 1257 #ifdef DOUG_LEA_MALLOC | 1259 #ifdef DOUG_LEA_MALLOC |
| 1258 mallopt (M_TOP_PAD, 64 * 4096); | 1260 BLOCK_INPUT; |
| 1261 mallopt (M_TOP_PAD, 64 * 4096); | |
| 1262 UNBLOCK_INPUT; | |
| 1259 #else | 1263 #else |
| 1260 #ifndef SYSTEM_MALLOC | 1264 #ifndef SYSTEM_MALLOC |
| 1261 /* Give GNU malloc's morecore some hysteresis | 1265 /* Give GNU malloc's morecore some hysteresis |
| 1262 so that we move all the relocatable blocks much less often. */ | 1266 so that we move all the relocatable blocks much less often. */ |
| 1263 __malloc_extra_blocks = 64; | 1267 __malloc_extra_blocks = 64; |
| 1284 virtual_break_value = break_value = first_heap->bloc_start = first_heap->end; | 1288 virtual_break_value = break_value = first_heap->bloc_start = first_heap->end; |
| 1285 #endif | 1289 #endif |
| 1286 | 1290 |
| 1287 use_relocatable_buffers = 1; | 1291 use_relocatable_buffers = 1; |
| 1288 } | 1292 } |
| 1293 | |
| 1294 /* arch-tag: 6a524a15-faff-44c8-95d4-a5da6f55110f | |
| 1295 (do not change this comment) */ |
