home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.sysv386:17703 comp.unix.programmer:5862 comp.lang.c:19398
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!mhinfo!rwc
- From: rwc@mhinfo.UUCP (Ralph Callaway)
- Newsgroups: comp.unix.sysv386,comp.unix.programmer,comp.lang.c
- Subject: C malloc error
- Message-ID: <79@mhinfo.UUCP>
- Date: 8 Jan 93 01:58:49 GMT
- Followup-To: poster
- Distribution: na
- Organization: Mile-High Information Services, Inc.
- Lines: 67
-
-
- 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
-
- Relavent system parameters are:
-
- NSCRN 5 console multiscreens reduced from 12
- SCRNMEM 0 determined at startup
- MAXPMEM 0 use all physical memory
- MAXUMEM 8192 max pages of user's virtual address space
- NDISK 2 two disk drives
- NBUF 128 reduced from a calculated 400+
- CTBUFSIZE 64 we don't have a tape, anyway
- DMAABLEBUF 4 down from 16
- NCOPYBUFS 4 reduced; why do I need any at all?
-
- I could continue tweaking these and other parameters, but I've already
- freed up over 400KB and the problem persists. The problem is ...
-
- 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?".
-
- 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?
- 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.
-
- I could probably get a better grip on this problem, except for the next one
- (which may be the same one, for all I know) ...
-
-
- Can't Link sdb
- ==============
- The application compiles and links fine normally but when I try to build it
- with "sdb", the build craps out with ...
-
- --------------------------------------------------------------------------------
- /usr/bin/cvtomf: fatal error -- too many modules
- '/usr/bin/cvtomf' failed, status = 0x1
- cc: Exit status 1
- *** Error code 1
-
- Stop.
- make: Exit status 1
- *** Error code 1
-
- Stop.
- --------------------------------------------------------------------------------
-
- Any help to "point" me in the rigth direction would be greatly
- appreciated. I am currently unable to continue programming
- until I get the problem figured out...
-
- Ralph Callaway
- (303) 721-0851
- rwc@mhinfo.com
-