summaryrefslogtreecommitdiff
path: root/src/w32heap.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* Minor fixes for MinGW64 build.Fabrice Popineau2013-12-311-2/+2
| | | | | | | | | | | | | | | | configure.ac (canonical, C_SWITCH_SYSTEM): Support a 64-bit MinGW64 build on MS-Windows. nt/inc/ms-w32.h (sys_kill): Fix prototype. src/w32term.c (w32_initialize): Use LCID and LOWORD. src/w32proc.c (create_child): Use pid_t for 5th argument. (IsValidLocale): Don't provide prototype for MinGW64. (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout) (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD. src/w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which MinGW64 doesn't support. src/lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
* Fix bug #13065 with file selector dialog on Windows 7.Eli Zaretskii2013-01-221-1/+5
| | | | | src/w32heap.c (allocate_heap) [!_WIN64]: Decrease the initial request of memory reservation to 1.7GB.
* Update copyright notices for 2013.Paul Eggert2013-01-011-1/+1
|
* Code cleanup for cygw32Daniel Colascione2012-10-081-15/+1
|
* fix NT buildDaniel Colascione2012-10-081-2/+0
|
* Merge from trunkDaniel Colascione2012-10-071-17/+27
|\
| * Support x64 build on MS-Windows with MSVC.Fabrice Popineau2012-09-301-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64. (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for compatibility with x64. src/w32term.c (w32_draw_underwave): Don't use GCC extensions for defining an XRectangle structure. src/w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer arithmetics for compatibility with x64. src/w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for compatibility with x64. src/w32heap.h: Adjust prototypes and declarations. src/w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap) (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of DWORD, long, and unsigned long, for compatibility with x64. (allocate_heap) [_WIN64]: Reserve 32GB of memory. (sbrk): Argument is now of type ptrdiff_t. src/w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being less than 0x0500. (w32_msg_pump): Use WPARAM type for 'result'. src/w32.c (init_environment, get_emacs_configuration): Support AMD64 architecture. (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for compatibility with x64. src/vm-limit.c (lim_data): Now size_t. (check_memory_limits): Adjust prototypes of real_morecore and __morecore to receive argument of type ptrdiff_t. Use size_t for five_percent and data_size. src/unexw32.c: Use DWORD_PTR instead of DWORD for file-scope variables, for compatibility with x64. (rva_to_section, offset_to_section, relocate_offset) (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET) (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info) (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD for compatibility with x64. src/sysdep.c (STDERR_FILENO): Define if not already defined. src/ralloc.c (real_morecore): Argument type is now ptrdiff_t. (__morecore): Argument type is now ptrdiff_t. (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'. (relinquish): Use ptrdiff_t type for 'excess'. (r_alloc_sbrk): Argument type is now ptrdiff_t. src/makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE. (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE) instead of a literal number. src/gmalloc.c [WINDOWSNT]: Include w32heap.h. (min): Define only if not already defined. src/frame.c (x_report_frame_params): Use EMACS_UINT for the return value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows hosts. src/image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since 'bitmaps' is a pointer. src/dispextern.h (x_bitmap_pixmap): Adjust prototype. src/alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__. nt/makefile.w32-in ($(TRES)): Use $(EMACS_MANIFEST). nt/inc/sys/socket.h: Don't map Winsock error codes to standard ones that are already defined. nt/inc/ms-w32.h (EMACS_INT, EMACS_UINT, EMACS_INT_MAX, PRIuMAX) (pI, _INTPTR) [_MSC_VER]: Fix definitions for MSVC. [_MSC_VER]: Add pragmas to suppress some MSVC warnings. nt/preprep.c (pfnCheckSumMappedFile, rva_to_section) (offset_to_section, relocate_offset, OFFSET_TO_RVA) (RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET, PTR_TO_RVA) (OFFSET_TO_PTR, ROUND_UP, ROUND_DOWN) (copy_executable_and_move_sections, ADJUST_IMPORT_RVA, main): Use DWORD_PTR instead of DWORD for compatibility with x64. nt/nmake.defs: Support AMD64. (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST): New macros. nt/gmake.defs: (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST): New macros. nt/addsection.c (pfnCheckSumMappedFile, rva_to_section) (offset_to_section, relocate_offset, OFFSET_TO_RVA) (RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET, PTR_TO_RVA) (OFFSET_TO_PTR, ROUND_UP, ROUND_DOWN) (copy_executable_and_add_section, main): Use DWORD_PTR instead of DWORD, for compatibility with x64. nt/emacs-x64.manifest: New file. nt/emacs-x86.manifest: Renamed from emacs.manifest. lib-src/ntlib.c (gettimeofday): Copy from src/w32.c. lib/gettime. needs this function.
* | Merge from trunkDaniel Colascione2012-09-171-1/+0
|\|
| * Fix MS-Windows build broken by 2012-09-15T07:06:56Z!eggert@cs.ucla.edu, ↵Eli Zaretskii2012-09-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | completing fix for bug #12446. src/w32xfns.c: src/w32uniscribe.c: src/w32term.c: src/w32select.c: src/w32reg.c: src/w32proc.c: src/w32menu.c: src/w32inevt.c: src/w32heap.c: src/w32font.c: src/w32fns.c: src/w32console.c: src/w32.c: src/w16select.c: Remove inclusion of setjmp.h, as it is now included by lisp.h. This completes removal of setjmp.h inclusion erroneously announced in the previous commit. src/lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary more accurate. src/image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is not defined as a macro. The latter happens on MS-Windows.
* | Implement cygw32Daniel Colascione2012-09-171-40/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Here, we use the generic window-system configuration system we just implemented to support the w32 window-system in the mainline build under Cygwin. (Previously, the w32 window system could only be compiled as part of the NT-native Emacs build process.) The changes in this patch need to be applied atomically in order to avoid breaking Emacs. The changes include: - Changes throughout the Lisp and C code to not assume that NT Emacs and the w32 window system are synonymous. - Wiring up the regular select(2) event loop to Windows messages - Cleaning up the w32 drag-and-drop receiving code. - Exposing Cygwin path conversion functions to elisp. - Unicode file dialog support when compiling for Cygwin. - Splitting the w32 term lisp initialization code into code applicable to any w32 window-system and code specific to system-type windows-nt. - Integrating the old and new w32 code into the build system.
* Rename OS_WINDOWS_95 to OS_9X.Eli Zaretskii2012-07-291-2/+2
| | | | | | | src/w32heap.h (OS_9X): Renamed from OS_WINDOWS_95. src/w32heap.c (cache_system_info): src/w32.c (sys_rename): src/w32proc.c (find_child_console, sys_kill): All users changed.
* Don't use the abbreviation "win" to refer to Windows (Bug#10421).Paul Eggert2012-07-291-3/+3
| | | | | | | | | | | | * lisp/org/ob-lilypond.el (ly-w32-ly-path): Rename from ly-win32-ly-path. (ly-w32-pdf-path): Rename from ly-win32-pdf-path. (ly-w32-midi-path): Rename from ly-win32-midi-path. (ly-determine-ly-path, ly-determine-pdf-path, ly-determine-midi-path): Check for "windows-nt", not "win32", in system-type. * src/regex.c (MAX_BUF_SIZE): Remove some incorrect and long-ago-commented-out code that talks about "WIN32". * src/w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95. All uses changed.
* Use a simple struct to implement compile time checks for the Lisp_Object typeAndreas Schwab2012-06-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: Rename --enable-use-lisp-union-type to --enable-check-lisp-object-type and define CHECK_LISP_OBJECT_TYPE instead of USE_LISP_UNION_TYPE. * admin/make-emacs: Rename --union-type to --check-lisp-type. Define CHECK_LISP_OBJECT_TYPE insted of USE_LISP_UNION_TYPE. * admin/CPP-DEFINES (DEBUG_LISP_OBJECT_TYPE): Renamed from USE_LISP_UNION_TYPE. * src/lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct instead of union. (XLI, XIL): Define. (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG): Use them. * src/emacs.c (gdb_use_struct): Renamed from gdb_use_union. * src/.gdbinit: Check gdb_use_struct instead of gdb_use_union. * src/alloc.c (widen_to_Lisp_Object): Removed. (mark_memory): Use XIL instead of widen_to_Lisp_Object. * src/frame.c (delete_frame): Remove outdated comment. * src/w32fns.c (Fw32_register_hot_key): Use XLI instead of checking USE_LISP_UNION_TYPE. (Fw32_unregister_hot_key): Likewise. (Fw32_toggle_lock_key): Likewise. * src/w32menu.c (add_menu_item): Likewise. (w32_menu_display_help): Use XIL instead of checking USE_LISP_UNION_TYPE. * src/w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE. (init_heap): Likewise. * src/w32term.c (w32_read_socket): Update comment.
* USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)Paul Eggert2012-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * alloc.c (make_number) [!defined make_number]: Remove, as lisp.h always defines this now. (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now. (roundup_size): Verify that it is a power of 2. * data.c (Fmake_variable_buffer_local, Fmake_local_variable): * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO. * lisp.h (USE_LSB_TAG): Allow the builder to compile with -DUSE_LSB_TAG=0, to override the automatically-selected default. USE_LSB_TAG now is always defined to be either 0 or 1. All uses changed. (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the code works fine either way, and efficiency is not a concern here, as the union type is for debugging, not for production. (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]: Use an inline function on all platforms when using the union type, since this is simpler and 'static inline' can be used portably within Emacs now. (LISP_INITIALLY_ZERO): New macro. (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove. (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
* Remove dead MSVC-specific code.Fabrice Popineau2012-03-251-24/+0
| | | | src/w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* Merge from emacs-23; up to 2010-06-10T05:17:21Z!rgm@gnu.org.Glenn Morris2011-05-041-1/+24
|\
| * Allow the Windows build to use upto 2GB of heap.Eli Zaretskii2011-04-291-1/+24
| | | | | | | | | | | | src/w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]: New version that can reserve upto 2GB of heap space. etc/NEWS: Mention the new feature.
* | Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-2/+1
| |
* | Merge from emacs-23Stefan Monnier2011-01-141-1/+1
|\|
| * Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-021-1/+1
| |
* | Remove config.h include guards.Dan Nicolaescu2010-11-151-5/+0
| | | | | | | | | | | | | | * src/w32proc.c: * src/w32inevt.c: * src/w32heap.c: * src/w32.c: Remove config.h include guards.
* | Merge changes from emacs-23 branch.Juanma Barranquero2010-10-141-1/+1
|\|
| * src/w32*.c: Whitespace fixes and typos.Juanma Barranquero2010-10-141-1/+1
| |
* | Do not include stdlib.h and string.h, config.h does it.Dan Nicolaescu2010-10-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xfont.c: * src/w32term.c: * src/w32reg.c: * src/w32inevt.c: * src/w32heap.c: * src/w32console.c: * src/w16select.c: * src/unexsol.c: * src/term.c: * src/sound.c: * src/scroll.c (m): * src/gtkutil.c: * src/font.c: * src/filelock.c: * src/fileio.c: * src/dosfns.c: * src/dbusbind.c: * src/bidi.c: * src/callproc.c: * src/process.c: * src/msdos.c: * src/charset.c: Do not include stdlib.h and string.h, config.h does it. * configure.in: Include stdlib.h and string.h unconditionally.
* | src/w32*.c: Convert function definitions to standard C.Juanma Barranquero2010-07-061-1/+1
|/
* Add 2010 to copyright years.Glenn Morris2010-01-131-1/+1
|
* * alloc.c: Do not define struct catchtag.Dan Nicolaescu2009-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eval.c: Move struct catchtag definition ... * lisp.h: ... here. * image.c: Move png.h #include earlier to avoid warnings. * xterm.c: * xsmfns.c: * xselect.c: * xrdb.c: * xmenu.c: * xftfont.c: * xfont.c: * xfns.c: * xfaces.c: * xdisp.c: * window.c: * widget.c: * w32xfns.c: * w32uniscribe.c: * w32term.c: * w32select.c: * w32reg.c: * w32proc.c: * w32menu.c: * w32inevt.c: * w32heap.c: * w32font.c: * w32fns.c: * w32console.c: * w32.c: * w16select.c: * vm-limit.c: * unexsol.c: * unexec.c: * unexcw.c: * unexaix.c: * undo.c: * tparam.c: * textprop.c: * terminfo.c: * terminal.c: * termcap.c: * term.c: * syntax.c: * sound.c: * sheap.c: * search.c: * scroll.c: * region-cache.c: * regex.c: * ralloc.c: * process.c: * print.c: * msdos.c: * minibuf.c: * menu.c: * marker.c: * macros.c: * keymap.c: * keyboard.c: * intervals.c: * insdel.c: * indent.c: * gtkutil.c: * ftxfont.c: * ftfont.c: * fringe.c: * frame.c: * fontset.c: * font.c: * fns.c: * floatfns.c: * filelock.c: * fileio.c: * emacs.c: * editfns.c: * dosfns.c: * doprnt.c: * doc.c: * dispnew.c: * dired.c: * dbusbind.c: * data.c: * composite.c: * coding.c: * cmds.c: * cm.c: * chartab.c: * charset.c: * character.c: * ccl.c: * category.c: * casetab.c: * casefiddle.c: * callproc.c: * callint.c: * bytecode.c: * buffer.c: * atimer.c: Include setjmp.h. (Bug#4643) * xlwmenu.c: * lwlib.c: * lwlib-utils.c: * lwlib-Xm.c: * lwlib-Xlw.c: * lwlib-Xaw.c: Include setjmp.h.
* Add 2009 to copyright years.Glenn Morris2009-01-081-1/+1
|
* * lisp.h:Dan Nicolaescu2008-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * w32heap.c: * emacs.c: * alloc.c: Replace all references of NO_UNION_TYPE with USE_LISP_UNION_TYPE. * m/xtensa.h (NO_UNION_TYPE): * m/vax.h (NO_UNION_TYPE): * m/template.h (NO_UNION_TYPE): * m/sparc.h (NO_UNION_TYPE): * m/mips.h (NO_UNION_TYPE): * m/macppc.h (NO_UNION_TYPE): * m/m68k.h (NO_UNION_TYPE): * m/iris4d.h (NO_UNION_TYPE): * m/intel386.h (NO_UNION_TYPE): * m/ibms390x.h (NO_UNION_TYPE): * m/ibms390.h (NO_UNION_TYPE): * m/ibmrs6000.h (NO_UNION_TYPE): * m/ia64.h (NO_UNION_TYPE): * m/hp800.h (NO_UNION_TYPE): * m/arm.h (NO_UNION_TYPE): * m/amdx86-64.h (NO_UNION_TYPE): * m/alpha.h (NO_UNION_TYPE): Remove definition, all platform were defining it the same.
* Switch to recommended form of GPLv3 permissions notice.Glenn Morris2008-05-141-8/+7
|
* Add 2008 to copyright years.Glenn Morris2008-01-081-1/+1
|
* Switch license to GPLv3 or later.Glenn Morris2007-07-251-1/+1
|
* Update copyright for years from Emacs 21 to present (mainly addingGlenn Morris2007-01-141-2/+2
| | | | 2001).
* (etext, edata): Remove unused definitions.Eli Zaretskii2006-05-261-4/+0
|
* Update years in copyright notice; nfc.Thien-Thi Nguyen2006-02-061-1/+2
|
* Update years in copyright notice; nfc.Thien-Thi Nguyen2005-08-071-1/+1
|
* Update FSF's address.Lute Kamstra2005-07-041-2/+2
|
* (RVA_TO_PTR): No need to #undef now.Eli Zaretskii2005-06-061-1/+0
|
* [USE_LSB_TAG]: Don't check heap location.Jason Rumney2004-05-181-1/+2
|
* Add arch taglinesMiles Bader2003-09-011-0/+3
|
* Don't redefine _heap_init and _heap_term on MSVC 7 build environments. PatchJuanma Barranquero2002-10-281-15/+15
| | | | from Jay Finger <jay_finger@hotmail.com> and Harald.Maier.BW@t-online.de.
* Include <config.h>.Pavel Janík2002-01-011-1/+3
|
* (w32_build_number): New variable.Andrew Innes2000-11-051-0/+5
| | | | (cache_system_info): Set it.
* [!USE_CRT_DLL]: Don't define _heap_init and _heap_termAndrew Innes2000-08-221-2/+2
| | | | | unless we are linking with a static CRT. (RVA_TO_PTR): Cast result to unsigned char*.
* w32heap.c (osinfo_cache): New variable.Geoff Voelker1999-06-241-0/+8
| | | | (cache_system_info): Initialize osinfo_cache.
* (RVA_TO_PTR): Redefine to convert RVA to address inAndrew Innes1999-01-171-104/+69
| | | | | | | | | | | | | | | | | | current process. (round_to_next): Obsolete function removed. (preload_heap_section): New variable. (data_region_size): Obsolete variable removed. (allocate_heap): Modified to determine end of static heap section used during preload, and use that as initial base address for dynamic heap instead of hard-coded value. (sbrk): Remove call to allocate_heap; handled by init_heap. Skip calls to commit or decommit pages when allocating from static heap section during preload. (recreate_heap): Obsolete function removed. (init_heap): New function to initialize internal sbrk heap variables. Uses static heap section during preload, otherwise calls allocate_heap to reserve a heap region dynamically. (round_heap): Use ROUND_UP macro instead of round_to_next.
* (allocate_heap): Define NTHEAP_PROBE_BASE by default.Geoff Voelker1998-09-021-1/+2
|
* (recreate_heap): Invoke w32_fatal_reload_error upon error.Geoff Voelker1998-04-171-1/+1
|