This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Help! cygwin's malloc does not work
- To: <cygwin at sourceware dot cygnus dot com>
- Subject: Help! cygwin's malloc does not work
- From: "Serge Nikulin" <nikulin at actsw dot amat dot com>
- Date: Mon, 17 Apr 2000 15:20:21 -0700
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