home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.sysv386:17707 comp.unix.programmer:5864 comp.lang.c:19410
- Newsgroups: comp.unix.sysv386,comp.unix.programmer,comp.lang.c
- Path: sparky!uunet!virtech!cpcahil
- From: cpcahil@vti.com (Conor P. Cahill)
- Subject: Re: C malloc error
- Message-ID: <C0JAGw.310@vti.com>
- Organization: Virtual Technologies Inc.
- Date: Fri, 8 Jan 1993 11:55:43 GMT
- Lines: 55
-
-
- > malloc Failure
- > ==============
- >
- > 386PC running SCO 3.2.V4 w/ 4MB
- > (1152KB used by Unix and 2944KB available to users)
- > This is a single user system for C code development
- >
- > After numerous successful "malloc" calls in this application have grabbed a
- > total of about 16KB, a malloc fails even though the buffer it's trying to
- > allocate at the time is 16KB or less. I've tried both of SCO Unix's malloc
- > routines and there's no difference. The Unix motto applies here ... "Why have
- > just one standard when you can have many?".
-
- This could be that you have run out of memory, or that you have clobbered you
- memory pointers somewhere. What does SAR report for available memory while
- your program is running?
-
- How much swap space do you have on the system? You could have a problem if
- you don't have enough swap space.
-
- 4MB is really too small for acceptable performance for development (with any
- SVR3.2 system). You should upgrade to at least 8MB.
-
- If SAR reports enough free swap and free ram, then the problem is probably
- caused by a pointer overrun. To track down this problem you could use our
- product (SENTINEL) which is designed to handle such problems. Send email if
- you would like more info.
-
- > Here's a related issue: "sar" tells me that there are typically about 250-300
- > pages of "freemem" with the system doing nothing. What is a sar freemem page?
-
- Sar memory pages are 4k. Sar disk (swap) pages are 512 bytes.
-
- > If it's 512 bytes, where did all the memory go when the system
- > supposedly has 2944 KB? When the application runs, the freemem value does
- > indeed decline. If it's only got 12-15KB available it would certainly have a
- > problem. "ps" shows the process sitting there consuming 84 pages (or clicks,
- > whatever a click is) and it never changes even though the sar freemem
- > value does change.
-
- Ps pages are 4k. 84 pages means that your program is almost 350 k.
-
-
- > /usr/bin/cvtomf: fatal error -- too many modules
- > '/usr/bin/cvtomf' failed, status = 0x1
-
- Don't know what is happening here.
-
-
- --
- *** SENTINEL(tm) The ultimate Debugging Environment - email for more info ***
-
- Conor P. Cahill (703)430-9247 cpcahil@virtech.vti.com
- Virtual Technologies, Inc. 46030 Manekin Plaza Dulles, VA 20166
-