aboutsummaryrefslogtreecommitdiffstats
path: root/src/gmalloc.c
diff options
context:
space:
mode:
authorTom Tromey2012-12-17 07:56:22 -0700
committerTom Tromey2012-12-17 07:56:22 -0700
commit3d6eced1ae51ffd0a782130e7c334052277e2724 (patch)
tree5d1d2ad7cd3374f922886c4a72062511a035c168 /src/gmalloc.c
parentbf69f522a9e135f9aa483cedd53e71e915f2bf75 (diff)
parent7c3d167f48d6262ee4e5512aa50a07ee96bc1509 (diff)
downloademacs-3d6eced1ae51ffd0a782130e7c334052277e2724.tar.gz
emacs-3d6eced1ae51ffd0a782130e7c334052277e2724.zip
merge from trunk
Diffstat (limited to 'src/gmalloc.c')
-rw-r--r--src/gmalloc.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gmalloc.c b/src/gmalloc.c
index 78d6934755b..c325ca79910 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -36,6 +36,10 @@ Fifth Floor, Boston, MA 02110-1301, USA.
36#include <pthread.h> 36#include <pthread.h>
37#endif 37#endif
38 38
39#ifdef WINDOWSNT
40#include <w32heap.h> /* for sbrk */
41#endif
42
39#ifdef __cplusplus 43#ifdef __cplusplus
40extern "C" 44extern "C"
41{ 45{
@@ -460,7 +464,7 @@ get_contiguous_space (ptrdiff_t size, void *position)
460/* This is called when `_heapinfo' and `heapsize' have just 464/* This is called when `_heapinfo' and `heapsize' have just
461 been set to describe a new info table. Set up the table 465 been set to describe a new info table. Set up the table
462 to describe itself and account for it in the statistics. */ 466 to describe itself and account for it in the statistics. */
463static inline void 467static void
464register_heapinfo (void) 468register_heapinfo (void)
465{ 469{
466 size_t block, blocks; 470 size_t block, blocks;
@@ -1289,7 +1293,9 @@ Fifth Floor, Boston, MA 02110-1301, USA.
1289 The author may be reached (Email) at the address mike@ai.mit.edu, 1293 The author may be reached (Email) at the address mike@ai.mit.edu,
1290 or (US mail) as Mike Haertel c/o Free Software Foundation. */ 1294 or (US mail) as Mike Haertel c/o Free Software Foundation. */
1291 1295
1296#ifndef min
1292#define min(A, B) ((A) < (B) ? (A) : (B)) 1297#define min(A, B) ((A) < (B) ? (A) : (B))
1298#endif
1293 1299
1294/* On Cygwin the dumped emacs may try to realloc storage allocated in 1300/* On Cygwin the dumped emacs may try to realloc storage allocated in
1295 the static heap. We just malloc space in the new heap and copy the 1301 the static heap. We just malloc space in the new heap and copy the
@@ -1639,14 +1645,6 @@ memalign (size_t alignment, size_t size)
1639 return result; 1645 return result;
1640} 1646}
1641 1647
1642#ifndef ENOMEM
1643#define ENOMEM 12
1644#endif
1645
1646#ifndef EINVAL
1647#define EINVAL 22
1648#endif
1649
1650int 1648int
1651posix_memalign (void **memptr, size_t alignment, size_t size) 1649posix_memalign (void **memptr, size_t alignment, size_t size)
1652{ 1650{