Article View: comp.os.msdos.programmer
Article #6160{m|c|farm}alloc
From: Seth Chaiklin
Date: Tue, 22 Dec 1992 10:06
Date: Tue, 22 Dec 1992 10:06
20 lines
1346 bytes
1346 bytes
Whats the difference between malloc, farmalloc, calloc, etc? I didn't see anything in FAQ, nor really anything helpful in bchelp10.zip. I have read what is in the Turbo C 2.0 manual, so I know that malloc is DOS specific while calloc can be found in Unix. I know the general differences between farmalloc and malloc as described in the manuals, but what I am really interested in is to understand, WHEN one would prefer to use one or the other. Second, is there a relation between these *allocs and the memory model that is used with the compiler? If one uses farmalloc, must one compile with a compact or large model? It seems that I could compile farmalloc with a small model and the compiler wouldn't complain. (As some of you may realize, my "general" interest in this is connected to trying to get a >64K array up and running with a huge pointer, but perhaps it is worth knowing about this topic more generally.) Cheers, Seth Chaiklin psykseth@aau.dk
Technical Details
Message-ID:
<1992Dec22.100613.29860@aau.dk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!dkuug!daimi!aau!psyksethShow Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!dkuug!daimi!aau!psykseth
From: psykseth@aau.dk (Seth Chaiklin)
Subject: {m|c|farm}alloc
Message-ID: <1992Dec22.100613.29860@aau.dk>
Summary: What the difference?
Keywords: memory allocation
Organization: Aarhus University, Denmark
Date: Tue, 22 Dec 1992 10:06:13 GMT
Lines: 20