summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dll_init.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-10-22 16:18:55 +0000
committerChristopher Faylor <me@cgf.cx>2002-10-22 16:18:55 +0000
commit1cc651ecafae07b9ed6edff9952e2b31f0503d0a (patch)
tree682ab1ca541b857ae9440cec58d23fd61575d35a /winsup/cygwin/dll_init.cc
parent5ec14fe40ae1a6b11d27b975feca1b20de435467 (diff)
downloadcygnal-1cc651ecafae07b9ed6edff9952e2b31f0503d0a.tar.gz
cygnal-1cc651ecafae07b9ed6edff9952e2b31f0503d0a.tar.bz2
cygnal-1cc651ecafae07b9ed6edff9952e2b31f0503d0a.zip
* cygheap.cc (cygheap_fixup_in_child): Use user_heap element in cygheap.
(init_cheap): Ditto for declaration. * fork.cc (fork_parent): Use user_heap element in cygheap. * heap.h (inheap): Ditto. * heap.cc (sbrk): Ditto. (heap_init): Ditto. Reorganize to shrink heap chunk as required and record new value in cygheap. * dcrt0.cc (dll_crt0_1): More "move the cygthread init" games. * shared.cc (open_shared): Rework memory protection to properly deal with relocated shared segment. (shared_info::heap_chunk_size): Rename element to 'heap_chunk'. * shared_info.h (shared_info): Ditto for declaration. * strace.cc (strace::hello): Report on heap chunk size from cygheap since it may shrink.
Diffstat (limited to 'winsup/cygwin/dll_init.cc')
-rw-r--r--winsup/cygwin/dll_init.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc
index 592381cde..76e26fe6e 100644
--- a/winsup/cygwin/dll_init.cc
+++ b/winsup/cygwin/dll_init.cc
@@ -261,8 +261,10 @@ release_upto (const char *name, DWORD here)
{
size = mb.RegionSize;
if (!(mb.State == MEM_RESERVE && mb.AllocationProtect == PAGE_NOACCESS &&
- (((void *) start < cygheap->heapbase || (void *) start > cygheap->heaptop) &&
- ((void *) start < (void *) cygheap || (void *) start > (void *) ((char *) cygheap + CYGHEAPSIZE)))))
+ (((void *) start < cygheap->user_heap.base
+ || (void *) start > cygheap->user_heap.top) &&
+ ((void *) start < (void *) cygheap
+ | (void *) start > (void *) ((char *) cygheap + CYGHEAPSIZE)))))
continue;
if (!VirtualFree ((void *) start, 0, MEM_RELEASE))
api_fatal ("couldn't release memory %p(%d) for '%s' alignment, %E\n",