🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c
Article #9672

Re: Microport and SCO Xenix Memory Managment Problems

#9672
From: Daniel M. Frank
Date: Wed, 29 Oct 1986 15:21
34 lines
2023 bytes
>Unfortunately, malloc wasn't fixed to properly deal with the
>screwy behavior of brk and sbrk. For small malloc requests,
>malloc asks for a 1K chunk and allocates from that. Each time it
>decides to grab another 1K it gets it from a NEW segment. The
>net effect is that malloc squanders segments and can run out
>of memory because of a lack of LDT entries before it even comes
>close to hitting other limits.

   In the System V/286 port done by Intel, and further ported by
Microport and AT&T (SV/AT and 6300+ Unix), there is an additional
malloc library (described in malloc(3x)) which may be used instead
of the usual malloc stuff.  This library includes a routine called
mallopt(), which allows the following parameters to be set:

M_MXFAST  Allocate all blocks below the size of maxfast in large
		  groups.

M_NLBLKS  Each large group allocated will contain numlblks.

M_GRAIN   The sizes of all blocks smaller than maxfast are
		  considered to be rounded up to the nearest multiple of
		  grain.

M_KEEP    Emulates behaviour of old malloc() by keeping the
		  data in a block intact until that block is used again.

   By judicious use of these calls, the segment usage behaviour,
and most likely the speed, of memory allocation under SV/286 can
be significantly enhanced.

-- 
    Dan Frank
    uucp: ... uwvax!prairie!dan
    arpa: dan%caseus@spool.wisc.edu
Technical Details
Message-ID: <268@prairie.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!uwvax!astroatc!prairie!dan
References: <646@chinet.UUCP> <4104@ism780c.UUCP> <105@wldrdg.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!uwvax!astroatc!prairie!dan
From: dan@prairie.UUCP (Daniel M. Frank)
Newsgroups: net.lang.c,net.unix
Subject: Re: Microport and SCO Xenix Memory Managment Problems
Message-ID: <268@prairie.UUCP>
Date: Wed, 29-Oct-86 10:21:44 EST
Article-I.D.: prairie.268
Posted: Wed Oct 29 10:21:44 1986
Date-Received: Wed, 29-Oct-86 22:14:19 EST
References: <646@chinet.UUCP> <4104@ism780c.UUCP> <105@wldrdg.UUCP>
Reply-To: dan@prairie.UUCP (Daniel M. Frank)
Organization: Prairie Computing, Madison, Wisconsin
Lines: 34