Borland Turbo C 1.5 (Medium --> Large)

Don_A_Corbitt at cup.portal.com Don_A_Corbitt at cup.portal.com
Tue Nov 15 02:06:48 AEST 1988


[changed memory model from small (16 bit) data pointer to large 
(32 bit) data pointer on IBM-PC, and program started hanging]

>Has anyone else experienced this?  And if so, or if not so too, what
>might be the cause of it?  I am not very familiar (as I should be)
>with the main difference (advantages/disadvantages) of the MEDIUM
>and LARGE models.  Would going to HUGE solve my problems or create
>more?
>Mark J. Bailey                                    "Y'all com bak naw, ya hear!"
>USMAIL: 511 Memorial Blvd., Murfreesboro, TN 37129 ___________________________
>VOICE:  +1 615 893 4450 / +1 615 896 4153          |         JobSoft
>UUCP:   ...!{ames,mit-eddie}!killer!mjbtn!mjb      | Design & Development Co.
>DOMAIN: mjb at mjbtn.MFEE.US.TN                       |  Murfreesboro, TN  USA
TC is tracking the ASNI standard.  This means that you should
	1) enable _all_ warning messages
	2) fix your code until all warnings are fixed
	3) #include header files for all library functions
Your problem is that you didn't include alloc.h, which defines malloc() as
returning a 32 bit pointer.  This was OK in 16 bit model, where TC assumed
malloc() returned an int, and converted it to a near pointer.  In large data
model, sizeof(pointer) != sizeof(int), so you must include the prototype for
any function that returns a pointer.
	Don_A_Corbitt at cup.portal.com "Where anyone can harass the net for $10"
	CrystalGraphics, Inc. 



More information about the Comp.lang.c mailing list