wrong malloc return

florin coter ssreefc at techunix.BITNET
Mon May 8 19:53:45 AEST 1989


        hello world,
        this is the code

        void main()
        {
                void *malloc( .... );
                char *p;

                if( ( p = (char *)malloc( many mega bytes... ) ) == NULL )
                        puts( "no space..." );
        }

        well, the use of the code is not relevant here. what is relevant
is the fact that i run it on an ibm with 640 Kb of ram. i compile with
turboC 1.5. it never complaines, but i never get the "no space..."
line on the screen. why ?
please email.
thanx, florin.

--------
Florin Coter          ssreefc at techunix
Home address:         40/37 Leon Blum St., Haifa, Israel.
Home phone:           04-386133.
Office address:       Solid State Institute, Technion, Haifa 3200, Israel.
Office phone:         04-293938/293613/293615.



More information about the Comp.lang.c mailing list