Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!ut-sally!husc6!bloom-beacon!gatech!emory!platt From: platt@emory.uucp (Dan Platt) Newsgroups: comp.sys.ibm.pc Subject: Re: Microsoft C 4.0 large models Message-ID: <2195@emory.uucp> Date: Thu, 6-Aug-87 00:27:16 EDT Article-I.D.: emory.2195 Posted: Thu Aug 6 00:27:16 1987 Date-Received: Sat, 8-Aug-87 10:44:32 EDT References: <3225@cucca.columbia.edu> <3320039@hpsrlc.HP.COM> <2190@emory.uucp> <4589@jade.BERKELEY.EDU> Reply-To: platt@emory.UUCP (Dan Platt) Distribution: world Organization: Math & Computer Science, Emory University, Atlanta Lines: 33 Keywords: Huge model... Summary: Huge models In article <4589@jade.BERKELEY.EDU> ehughes@violet.berkeley.edu () writes: >On many DOS compilers, the allocated memory pool is taken from a single >segment, i.e. 64K max. This is true EVEN IN LARGE MODEL. It is simply >an outright laziness on the part of the library writers not to take >this into consideration.... I would like to point out that the large pointers don't handle the problem of an element size exceeding 64k. However, huge structure types do allow a pointer to a structure whose size exceeds 64k. There are huge pointer types, and it's possible to allocate a simple linear array that exceeds 64k in size. In this sense the complaint isn't fair (also, there's a memory allocation routine for huge pointers called halloc (huge_malloc) which handles the corresponding job. The command line parameter allowing huge compilation is /AH. This works fine if the large memory library is there. Also, it's possible to allocate square arrays that exceed 64k even though you're using only the large model.... as follows: ... double **a; a= (double **)malloc(n*sizeof(double *)); for(i=0;i