Help! cygwin's malloc does not work
Serge Nikulin
nikulin@actsw.amat.com
Mon Apr 17 15:21:00 GMT 2000
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
file.
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);
free(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
a.exe.stackdump
The latest version of Cygwin.dll does not crash but prints 00000000 (malloc
failed).
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
showstopper.
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list