From c29e693388663aaa42f041965258fa6b6bafc938 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 10 May 2011 15:39:02 +0000 Subject: * 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. --- winsup/cygwin/heap.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/heap.cc') 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 (); -- cgit v1.2.3