Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.ARPA Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!anton From: anton@ucbvax.ARPA (Jeff Anton) Newsgroups: net.lang.c,net.unix Subject: Re: malloc(), virtual memory Message-ID: <10276@ucbvax.ARPA> Date: Thu, 5-Sep-85 15:13:16 EDT Article-I.D.: ucbvax.10276 Posted: Thu Sep 5 15:13:16 1985 Date-Received: Sat, 7-Sep-85 04:15:01 EDT References: <203@cirl.UUCP> Reply-To: anton@ucbvax.UUCP (Jeff Anton) Distribution: net Organization: University of California at Berkeley Lines: 24 Xref: watmath net.lang.c:6266 net.unix:5583 In article <203@cirl.UUCP> gary@cirl.UUCP (Gary Girzon) writes: >I would appreciate some help on the following problem. When using >malloc() in C ( runing 4.2 bsd ), I cannot allocate more than roughly >4 megabytes. This seems to be limited by our core size. I would >like to know whether this limit can be extended to handle virtual >memory on the VAX. Also, any information on how the C compiler deals with >virtual memory (if at all) would be appreciated. The C compiler does not bother with VMem knowledge except for its own use. You are probably encountering a limit imposed by malloc. I'd suggest you try useing sbrk(2). I recently needed a 6 Mbytes for raster plotting and malloc complained but sbrk worked fine. I don't suggest running jobs that exceed system core size, but sometimes we don't have any way around the matter. You might also try out the 'limit' command in csh. Check out sbrk(2), setrusage(2), and the 'obsolete' vadvise(2). (vadvise is hidden in 4.2 for use by lisp, and some CAD tools, and maybe apl; it might be named Ovadvise) -- C knows no bounds. Jeff Anton U.C.Berkeley Ingres Group ucbvax!anton anton@BERKELEY.EDU