cygheap.cc: CVS head is broken #ifndef DEBUGGING

Gerd Spalink Gerd.Spalink@t-online.de
Sun Mar 21 21:22:00 GMT 2004


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



More information about the Cygwin-developers mailing list