Thread View: comp.sys.ibm.pc.programmer
4 messages
4 total messages
Started by John R. Dudeck
Sat, 10 Mar 1990 07:07
Is there a bug in MSC 5.1 malloc for far data?
Author: John R. Dudeck
Date: Sat, 10 Mar 1990 07:07
Date: Sat, 10 Mar 1990 07:07
19 lines
1370 bytes
1370 bytes
I have been having trouble with a compiler project that I am doing in MS C 5.1. It appears that malloc() is sometimes getting hung in a very tight loop. It doesn't happen all the time. If I run my program right after rebooting it always works, but if I run it right after a compile, sometimes malloc hangs. If I run it in CodeView and this happens I can stop it with Ctrl-Break, and step through the machine language, and it is stuck in the library routine in a very tight (about 6 instructions) loop. I am using the compact memory model, on a 386/20, and MS-DOS 4.01. Just wondering if this is a known bug, or a common programmer error of some sort? -- John Dudeck "You want to read the code closely..." jdudeck@Polyslo.CalPoly.Edu -- C. Staley, in OS course, teaching ESL: 62013975 Tel: 805-545-9549 Tanenbaum's MINIX operating system.
Re: Is there a bug in MSC 5.1 malloc for far data?
Author: Charles Hannum
Date: Sun, 11 Mar 1990 08:37
Date: Sun, 11 Mar 1990 08:37
13 lines
963 bytes
963 bytes
How do you expect anyone to help you if you don't include a sample of code
that demonstrates this "bug"?
I suspect it is programmer error, as I've never heard about this "bug" before.
(I don't use MSC myself, though I have it; I prefer Turbo C.)
Virtually,
- Charles Martin Hannum II "Klein bottle for sale ... inquire within."
(That's Charles to you!) "To life immortal!"
cmh117@psuvm.{bitnet,psu.edu} "No noozzzz izzz netzzzsnoozzzzz..."
c9h@psuecl.{bitnet,psu.edu} "Mem'ry, all alone in the moonlight ..."
Re: Is there a bug in MSC 5.1 malloc for far data?
Author: Brett G. Person
Date: Sun, 11 Mar 1990 23:13
Date: Sun, 11 Mar 1990 23:13
8 lines
771 bytes
771 bytes
It may be that the memory is not being free()'d properly. I've seen this happen before with my own code. You really dont give a lot of detail, but I suspect that this is what is happening. -- Brett G. Person North Dakota State University uunet!plains!person | person@plains.bitnet | person@plains.nodak.edu
Re: Is there a bug in MSC 5.1 malloc for far data?
Author: John R. Dudeck
Date: Mon, 12 Mar 1990 19:32
Date: Mon, 12 Mar 1990 19:32
13 lines
1267 bytes
1267 bytes
Thanks to those that have responded to my query about malloc(). I asked it because I wanted to know whether there was a "known bug", or whether to look further in to my code. In the end I found the problem totally elsewhere in my program, where some pointer manipulation managed to hose up MS-DOS (I was clobbering low addresses). I found the problem when I compiled it on a Unix system that gave me a core dump on the offending operations. -- John Dudeck "You want to read the code closely..." jdudeck@Polyslo.CalPoly.Edu -- C. Staley, in OS course, teaching ESL: 62013975 Tel: 805-545-9549 Tanenbaum's MINIX operating system.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads