This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cygheap.cc: CVS head is broken #ifndef DEBUGGING


I just updated my CVS sources, and I got a compiler error.

The code below from src/winsup/cygwin/cygheap.cc
does not compile if DEBUGGING is not defined


static void
init_cheap ()
{
#ifndef DEBUGGING
  alloc_sz = CYGHEAPSIZE;
#else
  char buf[80];
  DWORD initial_sz = 0;
  if (!GetEnvironmentVariable ("CYGWIN_HEAPSIZE", buf, sizeof buf - 1))
    alloc_sz = CYGHEAPSIZE;
  else
    {
      initial_sz = alloc_sz = atoi (buf);
      small_printf ("using cygheap size %d\n", alloc_sz);
    }
#endif
  do
    if ((cygheap = (init_cygheap *) VirtualAlloc ((void *) &_cygheap_start,
                                                  alloc_sz, MEM_RESERVE,
                                                  PAGE_NOACCESS)))
      break;
  while ((alloc_sz -= 2 * (1024 * 1024)) >= CYGHEAPSIZE_MIN);
  if (alloc_sz != initial_sz)
==================^^^^^^^^^^^ the problem is here (line 73)

Gerd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]