Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!mit-amt!hman From: hman@mit-amt.UUCP Newsgroups: comp.lang.c Subject: Micro Soft C v.4.0 allocation problem Message-ID: <1051@mit-amt.MEDIA.MIT.EDU> Date: Tue, 5-May-87 18:30:42 EDT Article-I.D.: mit-amt.1051 Posted: Tue May 5 18:30:42 1987 Date-Received: Thu, 7-May-87 02:28:12 EDT Reply-To: hman@media-lab.MEDIA.MIT.EDU (Harry W Morris) Distribution: world Organization: MIT Media Lab, Cambridge MA Lines: 24 Keywords: alloc, calloc Summary: memory management in MS DOS I have been having a problem with MSC v.4.0 that I hope someone can help me with. I will also contact Micro Soft, but I'm on a deadline, and I'm affraid that they will take too long. According to the Run Time Library Reference Manual, calloc should return NULL if there is insufficient memory available. I do a lot of callocing in my program. It works fine up to a point, then calloc returns a pointer which points to the middle of a position I had previously callocated. The program is quite large and I've run out of data space (huge model, 640K) before. I don't think this is the problem though, since I have spend the last few months optimizing memory and cutting out unnecessary functions. Do any of you know why calloc is doing this and if there are any ways around it? Is this an honest to goodness bug? Any help appreciated. Send Mail to hman@media-lab.MEDIA.MIT.EDU or Harry Morris 150 Spring St. Camb. MA 02141