diff options
| author | Fabrice Popineau | 2014-05-27 20:31:17 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-05-27 20:31:17 +0300 |
| commit | 587fd086a045f715932f886ecf31015932464ce6 (patch) | |
| tree | d8c647af107ef94318fd920a05da09af654ef1c9 /src/image.c | |
| parent | 0da7d35c6754b44d1ef4383e4a8ba9b98afc3a4c (diff) | |
| download | emacs-587fd086a045f715932f886ecf31015932464ce6.tar.gz emacs-587fd086a045f715932f886ecf31015932464ce6.zip | |
Use mmap(2) emulation for buffer text on MS-Windows.
src/Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
configure.
(ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
src/lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
for MinGW, since it no longer uses gmalloc.
src/buffer.c: Do not define mmap allocations functions for Windows.
Remove mmap_find which is unused. Remove mmap_set_vars which does
nothing useful.
[WINDOWSNT]: Include w32heap.h.
(init_buffer): Always allocate new memory for buffers.
src/emacs.c: Remove mmap_set_vars calls.
src/image.c (free_image): Undef free for Windows because it is
redirected to our private version.
src/unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits
compatibility.
(copy_executable_and_dump_data): Remove dumping the heap section.
(unexec): Restore using_dynamic_heap after dumping.
src/w32heap.c (dumped_data_commit, malloc_after_dump)
(malloc_before_dump, realloc_after_dump, realloc_before_dump)
(free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
(mmap_free): New functions.
src/w32heap.h: Declare dumped_data and mmap_* function prototypes.
nt/inc/ms-w32.h: Switch to the system heap allocation scheme
instead of GNU malloc and ralloc.
nt/inc/sys/mman.h: New file.
nt/INSTALL: Update for the new build requirements.
etc/NEWS: Mention build changes on MS-Windows.
configure.ac (C_HEAP_SWITCH) define for different values of
dumped heap size depending on 32/64bits arch on Windows.
Don't check for pthreads.h on MinGW32/64, it gets in the way.
Use mmap(2) for buffers and system malloc for MinGW32/64.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/image.c b/src/image.c index 07cf9f9af49..304603e7382 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -998,6 +998,11 @@ free_image (struct frame *f, struct image *img) | |||
| 998 | 998 | ||
| 999 | c->images[img->id] = NULL; | 999 | c->images[img->id] = NULL; |
| 1000 | 1000 | ||
| 1001 | /* Windows NT redefines 'free', but in this file, we need to | ||
| 1002 | avoid the redefinition. */ | ||
| 1003 | #ifdef WINDOWSNT | ||
| 1004 | #undef free | ||
| 1005 | #endif | ||
| 1001 | /* Free resources, then free IMG. */ | 1006 | /* Free resources, then free IMG. */ |
| 1002 | img->type->free (f, img); | 1007 | img->type->free (f, img); |
| 1003 | xfree (img); | 1008 | xfree (img); |
| @@ -6453,7 +6458,6 @@ jpeg_file_src (j_decompress_ptr cinfo, FILE *fp) | |||
| 6453 | src->mgr.next_input_byte = NULL; | 6458 | src->mgr.next_input_byte = NULL; |
| 6454 | } | 6459 | } |
| 6455 | 6460 | ||
| 6456 | |||
| 6457 | /* Load image IMG for use on frame F. Patterned after example.c | 6461 | /* Load image IMG for use on frame F. Patterned after example.c |
| 6458 | from the JPEG lib. */ | 6462 | from the JPEG lib. */ |
| 6459 | 6463 | ||