home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / sysv386 / 17703 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  2.8 KB

  1. Xref: sparky comp.unix.sysv386:17703 comp.unix.programmer:5862 comp.lang.c:19398
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!mhinfo!rwc
  3. From: rwc@mhinfo.UUCP (Ralph Callaway)
  4. Newsgroups: comp.unix.sysv386,comp.unix.programmer,comp.lang.c
  5. Subject: C malloc error
  6. Message-ID: <79@mhinfo.UUCP>
  7. Date: 8 Jan 93 01:58:49 GMT
  8. Followup-To: poster
  9. Distribution: na
  10. Organization: Mile-High Information Services, Inc.
  11. Lines: 67
  12.  
  13.  
  14. malloc Failure
  15. ==============
  16.  
  17. 386PC running SCO 3.2.V4 w/ 4MB
  18. (1152KB used by Unix and 2944KB available to users)
  19. This is a single user system for C code development
  20.  
  21. Relavent system parameters are:
  22.  
  23.     NSCRN        5    console multiscreens reduced from 12
  24.     SCRNMEM        0    determined at startup
  25.     MAXPMEM        0    use all physical memory
  26.     MAXUMEM        8192    max pages of user's virtual address space
  27.     NDISK        2    two disk drives
  28.     NBUF            128    reduced from a calculated 400+
  29.     CTBUFSIZE        64    we don't have a tape, anyway
  30.     DMAABLEBUF    4    down from 16
  31.     NCOPYBUFS        4    reduced; why do I need any at all?
  32.  
  33. I could continue tweaking these and other parameters, but I've already 
  34. freed up over 400KB and the problem persists. The problem is ... 
  35.  
  36. After numerous successful "malloc" calls in this application have grabbed a
  37. total of about 16KB, a malloc fails even though the buffer it's trying to
  38. allocate at the time is 16KB or less. I've tried both of SCO Unix's malloc
  39. routines and there's no difference. The Unix motto applies here ... "Why have
  40. just one standard when you can have many?". 
  41.  
  42. Here's a related issue: "sar" tells me that there are typically about 250-300
  43. pages of "freemem" with the system doing nothing. What is a sar freemem page?
  44. If it's 512 bytes, where did all the memory go when the system
  45. supposedly has 2944 KB? When the application runs, the freemem value does
  46. indeed decline. If it's only got 12-15KB available it would certainly have a
  47. problem. "ps" shows the process sitting there consuming 84 pages (or clicks,
  48. whatever a click is) and it never changes even though the sar freemem
  49. value does change. 
  50.  
  51. I could probably get a better grip on this problem, except for the next one
  52. (which may be the same one, for all I know) ...
  53.  
  54.  
  55. Can't Link sdb
  56. ==============
  57. The application compiles and links fine normally but when I try to build it
  58. with "sdb", the build craps out with ... 
  59.  
  60. --------------------------------------------------------------------------------
  61. /usr/bin/cvtomf: fatal error -- too many modules
  62. '/usr/bin/cvtomf' failed, status = 0x1
  63. cc: Exit status 1
  64. *** Error code 1
  65.  
  66. Stop.
  67. make: Exit status 1
  68. *** Error code 1
  69.  
  70. Stop.
  71. --------------------------------------------------------------------------------
  72.  
  73. Any help to "point" me in the rigth direction would be greatly
  74. appreciated.  I am currently unable to continue programming
  75. until I get the problem figured out...
  76.  
  77. Ralph Callaway
  78. (303) 721-0851
  79. rwc@mhinfo.com
  80.