Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!bu-cs!madd From: madd@bu-cs.BU.EDU (Jim Frost) Newsgroups: comp.sys.encore Subject: Re: memory limits Message-ID: <27865@bu-cs.BU.EDU> Date: 12 Feb 89 17:32:28 GMT References: <34669@tut.cis.ohio-state.edu> Reply-To: madd@bu-it.bu.edu (Jim Frost) Followup-To: comp.sys.encore Organization: Associative Design Technology Lines: 23 In article <34669@tut.cis.ohio-state.edu> George M. Jones writes: |Confusion. I wrote a program that does little more than malloc a number |of bytes specified on the command line. It also calls getrlimit(2) to |see what my "hard" and "soft" limits are for data, stack and resident |size. All come up 16 Meg ( 2**24 - 1), yet malloc fails when I try to |get much more than 8 Meg. share(2) does a little better, failing at between |12 and 13 meg. I am on a DPC system with 32 Meg physical memory and (at the |time) not much else going on. Ideas ? What am I missing ? What size mallocs are you using? I assume you realize that malloc takes up some space for internal organization (size of malloc'ed chunk is certainly going to be present) so smaller chunks could use substantial amounts of memory over a large number of mallocs. Also, if the size of your malloc doesn't exactly fit the size of area malloc can return (usually they malloc to double-word boundaries although this can vary) you can loose quite a bit of space there. Of course, malloc is still subject to actual resources available (regardless of software imposed limits) so you may just be running out. jim frost madd@bu-it.bu.edu