diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-05-10 15:39:02 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-05-10 15:39:02 +0000 |
commit | c29e693388663aaa42f041965258fa6b6bafc938 (patch) | |
tree | ab06a3773afd17d0f5c68cfa860817406fa5b670 /winsup/cygwin/heap.cc | |
parent | 6cfbf1a573bb6fe2d0d986eeaaa0992bd9e0c176 (diff) | |
download | cygnal-c29e693388663aaa42f041965258fa6b6bafc938.tar.gz cygnal-c29e693388663aaa42f041965258fa6b6bafc938.tar.bz2 cygnal-c29e693388663aaa42f041965258fa6b6bafc938.zip |
* fhandler_proc.cc (format_proc_uptime): Don't call GetSystemInfo.
Fetch CPU count from wincap.
(format_proc_stat): Ditto.
* globals.cc (system_info): Move to wincap.
* heap.cc (heap_init): Fetch page size from wincap.
* syscalls.cc (getpagesize): Fetch allocation granularity from wincap.
(getsystempagesize): Fetch page size from wincap.
* wincap.cc (wincap_2003): Default is_server to false.
(wincapc::init): Call GetSystemInfo here. Always set is_server value.
* wincap.h (class wincapc): Add system_info as private member.
(wincapc::cpu_count): New public method.
(wincapc::page_size): Ditto.
(wincapc::allocation_granularity): Ditto.
Diffstat (limited to 'winsup/cygwin/heap.cc')
-rw-r--r-- | winsup/cygwin/heap.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc index be4946d25..21516d5c9 100644 --- a/winsup/cygwin/heap.cc +++ b/winsup/cygwin/heap.cc @@ -1,6 +1,7 @@ /* heap.cc: Cygwin heap manager. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. This file is part of Cygwin. @@ -31,7 +32,7 @@ heap_init () /* If we're the forkee, we must allocate the heap at exactly the same place as our parent. If not, we don't care where it ends up. */ - page_const = system_info.dwPageSize; + page_const = wincap.page_size (); if (!cygheap->user_heap.base) { cygheap->user_heap.chunk = cygwin_shared->heap_chunk_size (); |