From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,79e7315f3341efa7 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-02-16 19:00:25 PST Path: nntp.gmd.de!stern.fokus.gmd.de!ceres.fokus.gmd.de!zib-berlin.de!news.belwue.de!news.uni-stuttgart.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!news.dfn.de!scsing.switch.ch!news.rediris.es!news.uoregon.edu!usenet.eel.ufl.edu!news.mathworks.com!newshost.marcam.com!charnel.ecst.csuchico.edu!olivea!decwrl!pa.dec.com!nntpd.lkg.dec.com!nntpd2.cxo.dec.com!nabeth.cxo.dec.com!alan From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) Newsgroups: comp.unix.osf.osf1 Subject: Re: Memory allocation question Date: 17 Feb 1995 03:00:25 GMT Organization: Digital Equipment Corporation Distribution: world Message-ID: <3i13g9$iji@nntpd2.cxo.dec.com> References: Reply-To: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) NNTP-Posting-Host: nabeth.cxo.dec.com In article , katz@elements.rpal.rockwell.com (Morry Katz) writes: >I have a need to allocate as much swap space as possible with a single >malloc. When I attempt this on a DEC Alpha running OSF1, the most >memory I can get in a single malloc is roughly half of the unused swap >space. (Any larger request and the malloc fails and returns an >error). The machine is configured with the swap spread over two >drives. There is roughly 500M of swap on the drives and I can get at >most 190M. Processes have a number of virtual memory limits associated with them; data size and stack size. There's also a system limit on the amount of virtual memory a process can have. Malloc comes from the data size limit. If you're using the C-shell, use limit to see what you limits are. If you're not using the shell you'll have to look at the configuration file for maxdsiz (data) and maxssiz (stack). The data size limit may be less than the maximum, but you can use limit to fix that. On my V1.3 system the datasize limit starts at 128 MB, but the maximum is 1 GB. > >Can a single malloc >effectively allocated space on multiple swap devices, or must one have >a single swap device as large as the biggest malloc request? The swap space can be viewed as a single area. Since V1.3 allocations have been distributed among the area. You should also check the swap space allocation algorithm to sure that space IS being allocated (or more correctly, reserved). The "lazy" algorithm doesn't reserve or allocate any until it is needed. The "eager" algorithm reserves what it knows it will need in advance, but also puts off the actual allocation until it is needed. >Any other ideas???? >-- >------------------------------------------------------ >Morry Katz >Rockwell Science Center >administrator@rpal.rockwell.com (machine administration issues) >katz@rpal.rockwell.com (other) >(415)723-9427 (office) >(415)694-9121 (beeper) >------------------------------------------------------ > -- Alan Rollow alan@nabeth.cxo.dec.com