[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/w32heap.c
From: |
Jason Rumney |
Subject: |
[Emacs-diffs] Changes to emacs/src/w32heap.c |
Date: |
Thu, 30 Jan 2003 15:55:27 -0500 |
Index: emacs/src/w32heap.c
diff -c emacs/src/w32heap.c:1.21 emacs/src/w32heap.c:1.22
*** emacs/src/w32heap.c:1.21 Tue Jan 1 14:10:04 2002
--- emacs/src/w32heap.c Mon Oct 28 12:50:03 2002
***************
*** 58,66 ****
void
cache_system_info (void)
{
! union
{
! struct info
{
char major;
char minor;
--- 58,66 ----
void
cache_system_info (void)
{
! union
{
! struct info
{
char major;
char minor;
***************
*** 157,167 ****
{
void *result;
long size = (long) increment;
!
result = data_region_end;
!
/* If size is negative, shrink the heap by decommitting pages. */
! if (size < 0)
{
int new_size;
unsigned char *new_data_region_end;
--- 157,167 ----
{
void *result;
long size = (long) increment;
!
result = data_region_end;
!
/* If size is negative, shrink the heap by decommitting pages. */
! if (size < 0)
{
int new_size;
unsigned char *new_data_region_end;
***************
*** 172,178 ****
if ((data_region_end - size) < data_region_base)
return NULL;
! /* We can only decommit full pages, so allow for
partial deallocation [cga]. */
new_data_region_end = (data_region_end - size);
new_data_region_end = (unsigned char *)
--- 172,178 ----
if ((data_region_end - size) < data_region_base)
return NULL;
! /* We can only decommit full pages, so allow for
partial deallocation [cga]. */
new_data_region_end = (data_region_end - size);
new_data_region_end = (unsigned char *)
***************
*** 188,196 ****
}
data_region_end -= size;
! }
/* If size is positive, grow the heap by committing reserved pages. */
! else if (size > 0)
{
/* Sanity checks. */
if ((data_region_end + size) >
--- 188,196 ----
}
data_region_end -= size;
! }
/* If size is positive, grow the heap by committing reserved pages. */
! else if (size > 0)
{
/* Sanity checks. */
if ((data_region_end + size) >
***************
*** 209,215 ****
real_data_region_end = (unsigned char *)
((long) (data_region_end + syspage_mask) & ~syspage_mask);
}
!
return result;
}
--- 209,215 ----
real_data_region_end = (unsigned char *)
((long) (data_region_end + syspage_mask) & ~syspage_mask);
}
!
return result;
}
***************
*** 232,238 ****
PIMAGE_NT_HEADERS nt_header;
dos_header = (PIMAGE_DOS_HEADER) RVA_TO_PTR (0);
! nt_header = (PIMAGE_NT_HEADERS) (((unsigned long) dos_header) +
dos_header->e_lfanew);
preload_heap_section = find_section ("EMHEAP", nt_header);
--- 232,238 ----
PIMAGE_NT_HEADERS nt_header;
dos_header = (PIMAGE_DOS_HEADER) RVA_TO_PTR (0);
! nt_header = (PIMAGE_NT_HEADERS) (((unsigned long) dos_header) +
dos_header->e_lfanew);
preload_heap_section = find_section ("EMHEAP", nt_header);
***************
*** 247,253 ****
/* Ensure that the addresses don't use the upper tag bits since
the Lisp type goes there. */
! if (((unsigned long) data_region_base & ~VALMASK) != 0)
{
printf ("Error: The heap was allocated in upper memory.\n");
exit (1);
--- 247,253 ----
/* Ensure that the addresses don't use the upper tag bits since
the Lisp type goes there. */
! if (((unsigned long) data_region_base & ~VALMASK) != 0)
{
printf ("Error: The heap was allocated in upper memory.\n");
exit (1);
***************
*** 274,288 ****
{
unsigned long needs_to_be;
unsigned long need_to_alloc;
!
needs_to_be = (unsigned long) ROUND_UP (get_heap_end (), align);
need_to_alloc = needs_to_be - (unsigned long) get_heap_end ();
!
! if (need_to_alloc)
sbrk (need_to_alloc);
}
! #if (_MSC_VER >= 1000 && !defined(USE_CRT_DLL))
/* MSVC 4.2 invokes these functions from mainCRTStartup to initialize
a heap via HeapCreate. They are normally defined by the runtime,
--- 274,288 ----
{
unsigned long needs_to_be;
unsigned long need_to_alloc;
!
needs_to_be = (unsigned long) ROUND_UP (get_heap_end (), align);
need_to_alloc = needs_to_be - (unsigned long) get_heap_end ();
!
! if (need_to_alloc)
sbrk (need_to_alloc);
}
! #if (_MSC_VER >= 1000 && _MSC_VER < 1300 && !defined(USE_CRT_DLL))
/* MSVC 4.2 invokes these functions from mainCRTStartup to initialize
a heap via HeapCreate. They are normally defined by the runtime,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/w32heap.c,
Jason Rumney <=