diff options
| author | Glenn Morris | 2011-05-04 21:00:38 -0700 |
|---|---|---|
| committer | Glenn Morris | 2011-05-04 21:00:38 -0700 |
| commit | f7ff1b0f0792f1f870778404531e68e77832c4a1 (patch) | |
| tree | 23cb550bdd3313df9b9b21a39a1a6c37c3258eec /src | |
| parent | 9869b3ae6b4dc59d522f80b405250139e49cc9b9 (diff) | |
| parent | 9bb095f46e44b642d3420a5f3b8d1443dab1b016 (diff) | |
| download | emacs-f7ff1b0f0792f1f870778404531e68e77832c4a1.tar.gz emacs-f7ff1b0f0792f1f870778404531e68e77832c4a1.zip | |
Merge from emacs-23; up to 2010-06-10T05:17:21Z!rgm@gnu.org.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/nsfns.m | 9 | ||||
| -rw-r--r-- | src/w32heap.c | 25 |
3 files changed, 38 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6819a76f028..b6e30ab817c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-05-05 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]: | ||
| 4 | New version that can reserve upto 2GB of heap space. | ||
| 5 | |||
| 6 | 2011-05-05 Chong Yidong <cyd@stupidchicken.com> | ||
| 7 | |||
| 8 | * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534). | ||
| 9 | |||
| 1 | 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com> | 10 | 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com> |
| 2 | 11 | ||
| 3 | * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to | 12 | * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to |
diff --git a/src/nsfns.m b/src/nsfns.m index d4445d1d627..cdf350066be 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -1416,9 +1416,10 @@ DEFUN ("ns-popup-color-panel", Fns_popup_color_panel, Sns_popup_color_panel, | |||
| 1416 | DEFUN ("ns-read-file-name", Fns_read_file_name, Sns_read_file_name, 1, 4, 0, | 1416 | DEFUN ("ns-read-file-name", Fns_read_file_name, Sns_read_file_name, 1, 4, 0, |
| 1417 | doc: /* Use a graphical panel to read a file name, using prompt PROMPT. | 1417 | doc: /* Use a graphical panel to read a file name, using prompt PROMPT. |
| 1418 | Optional arg DIR, if non-nil, supplies a default directory. | 1418 | Optional arg DIR, if non-nil, supplies a default directory. |
| 1419 | Optional arg ISLOAD, if non-nil, means read a file name for saving. | 1419 | Optional arg MUSTMATCH, if non-nil, means the returned file or |
| 1420 | directory must exist. | ||
| 1420 | Optional arg INIT, if non-nil, provides a default file name to use. */) | 1421 | Optional arg INIT, if non-nil, provides a default file name to use. */) |
| 1421 | (Lisp_Object prompt, Lisp_Object dir, Lisp_Object isLoad, Lisp_Object init) | 1422 | (Lisp_Object prompt, Lisp_Object dir, Lisp_Object mustmatch, Lisp_Object init) |
| 1422 | { | 1423 | { |
| 1423 | static id fileDelegate = nil; | 1424 | static id fileDelegate = nil; |
| 1424 | int ret; | 1425 | int ret; |
| @@ -1443,7 +1444,7 @@ Optional arg INIT, if non-nil, provides a default file name to use. */) | |||
| 1443 | if ([dirS characterAtIndex: 0] == '~') | 1444 | if ([dirS characterAtIndex: 0] == '~') |
| 1444 | dirS = [dirS stringByExpandingTildeInPath]; | 1445 | dirS = [dirS stringByExpandingTildeInPath]; |
| 1445 | 1446 | ||
| 1446 | panel = NILP (isLoad) ? | 1447 | panel = NILP (mustmatch) ? |
| 1447 | (id)[EmacsSavePanel savePanel] : (id)[EmacsOpenPanel openPanel]; | 1448 | (id)[EmacsSavePanel savePanel] : (id)[EmacsOpenPanel openPanel]; |
| 1448 | 1449 | ||
| 1449 | [panel setTitle: promptS]; | 1450 | [panel setTitle: promptS]; |
| @@ -1457,7 +1458,7 @@ Optional arg INIT, if non-nil, provides a default file name to use. */) | |||
| 1457 | 1458 | ||
| 1458 | panelOK = 0; | 1459 | panelOK = 0; |
| 1459 | BLOCK_INPUT; | 1460 | BLOCK_INPUT; |
| 1460 | if (NILP (isLoad)) | 1461 | if (NILP (mustmatch)) |
| 1461 | { | 1462 | { |
| 1462 | ret = [panel runModalForDirectory: dirS file: initS]; | 1463 | ret = [panel runModalForDirectory: dirS file: initS]; |
| 1463 | } | 1464 | } |
diff --git a/src/w32heap.c b/src/w32heap.c index bbdabd23502..477c11a5160 100644 --- a/src/w32heap.c +++ b/src/w32heap.c | |||
| @@ -114,6 +114,7 @@ get_data_end (void) | |||
| 114 | return data_region_end; | 114 | return data_region_end; |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | #if !defined (USE_LISP_UNION_TYPE) && !defined (USE_LSB_TAG) | ||
| 117 | static char * | 118 | static char * |
| 118 | allocate_heap (void) | 119 | allocate_heap (void) |
| 119 | { | 120 | { |
| @@ -140,9 +141,31 @@ allocate_heap (void) | |||
| 140 | 141 | ||
| 141 | return ptr; | 142 | return ptr; |
| 142 | } | 143 | } |
| 144 | #else /* USE_LISP_UNION_TYPE || USE_LSB_TAG */ | ||
| 145 | static char * | ||
| 146 | allocate_heap (void) | ||
| 147 | { | ||
| 148 | unsigned long size = 0x80000000; /* start by asking for 2GB */ | ||
| 149 | void *ptr = NULL; | ||
| 150 | |||
| 151 | while (!ptr && size > 0x00100000) | ||
| 152 | { | ||
| 153 | reserved_heap_size = size; | ||
| 154 | ptr = VirtualAlloc (NULL, | ||
| 155 | get_reserved_heap_size (), | ||
| 156 | MEM_RESERVE, | ||
| 157 | PAGE_NOACCESS); | ||
| 158 | size -= 0x00800000; /* if failed, decrease request by 8MB */ | ||
| 159 | } | ||
| 160 | |||
| 161 | return ptr; | ||
| 162 | } | ||
| 163 | #endif /* USE_LISP_UNION_TYPE || USE_LSB_TAG */ | ||
| 143 | 164 | ||
| 144 | 165 | ||
| 145 | /* Emulate Unix sbrk. */ | 166 | /* Emulate Unix sbrk. Note that ralloc.c expects the return value to |
| 167 | be the address of the _start_ (not end) of the new block in case of | ||
| 168 | success, and zero (not -1) in case of failure. */ | ||
| 146 | void * | 169 | void * |
| 147 | sbrk (unsigned long increment) | 170 | sbrk (unsigned long increment) |
| 148 | { | 171 | { |