This is the mail archive of the 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]

Help! cygwin's malloc does not work

I try to use GNU tools for our internal embedded (m68k) project.

My host PC is NT 4.0 + sp6a + 512 MB RAM + 510 MB VRAM

The final linked COFF file with debug info takes about 45MB (mega bytes)
Cygnus-compiled gdb (target=m68k in remote mode) crashes while loading this
I've traced the problem to cygwin1.dll
Basically, it looks like cygwin can not handle large memory allocations.
To prove this I scratched out very simple program:

int main()
  char * ptr = malloc(150000000); /* 150 MB */
  printf("%08X\n", ptr);

It works fine with MSVC and crashes with cygwin (CD 1.0):
    0 0 [sig] D:\test\a.exe 1000 stackdump: Dumping stack trace to

The latest version of Cygwin.dll does not crash but prints 00000000 (malloc

I could not trace the problem  in Cygwin.dll sources (I can not make it).
Win32-targeted GDB does not go to internals of cygwin.dll either.
MSVC' debugger does not understand cygwin1.dll debug info.

So I'm lost. I can not move furher.
Any help or suggestion?

BTW, the same problem occured when I've tried to use objcopy (coff->binary)
with that file.
Objcopy crashed. But I have MSVC-compiled objcopy so it is not the

Want to unsubscribe from this list?
Send a message to

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