home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / msdos / programm / 11573 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.3 KB  |  32 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!mcsun!sunic!dkuug!daimi!aau!psykseth
  3. From: psykseth@aau.dk (Seth Chaiklin)
  4. Subject: {m|c|farm}alloc
  5. Message-ID: <1992Dec22.100613.29860@aau.dk>
  6. Summary: What the difference?
  7. Keywords: memory allocation
  8. Organization: Aarhus University, Denmark
  9. Date: Tue, 22 Dec 1992 10:06:13 GMT
  10. Lines: 20
  11.  
  12. Whats the difference between malloc, farmalloc, calloc, etc?
  13. I didn't see anything in FAQ, nor really anything helpful in
  14. bchelp10.zip.  I have read what is in the Turbo C 2.0 manual, so
  15. I know that malloc is DOS specific while calloc can be found in 
  16. Unix.  I know the general differences between farmalloc and malloc
  17. as described in the manuals, but what I am really interested in is to 
  18. understand, WHEN one would prefer to use one or the other. 
  19.  
  20. Second, is there a relation between these *allocs and the memory model
  21. that is used with the compiler? If one uses farmalloc, must one
  22. compile with a compact or large model?  It seems that I could compile
  23. farmalloc with a small model and the compiler wouldn't complain.
  24.  
  25. (As some of you may realize, my "general" interest in this is connected
  26. to trying to get a >64K array up and running with a huge pointer, but
  27. perhaps it is worth knowing about this topic more generally.)
  28.  
  29. Cheers,
  30.   Seth Chaiklin
  31.   psykseth@aau.dk
  32.