Date: Sun, 26 Apr 1998 12:14:21 +0300 (IDT) From: Eli Zaretskii To: leger_v AT bluewin DOT ch cc: djgpp AT delorie DOT com Subject: Re: Problem with malloc() and integers In-Reply-To: <3541FB20.3606@bluewin.ch> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sat, 25 Apr 1998 leger_v AT bluewin DOT ch wrote: > 1)unsigned char *test[10]; > for(i=0;i<10;i++)test[i]=(unsigned char *)malloc(64000); > > 2)unsigned int (or long) *test[10]; > for(i=0;i<10;i++)test[i]=(unsigned int (or long) *)malloc(64000); > > The 1) works fine. But the 2) not : I obtain "exiting duing signal > SISEGV". What's the problem ? How much memory can we allocate ? You didn't post any complete code that can be compiled. You didn't even tell where exactly does your program crash. A simple test program I used with code like the above worked for me without crashing, so I cannot tell you anything useful except to look for a bug in your program, in something other than these two loops. Perhaps if you could post a small but complete program and the crash traceback printed when it dies on your machine, you would get more meaningful help.