🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix
Article #181

Help on malloc library

#181
From: Sreenivas Reddy
Date: Wed, 18 Jul 1990 06:42
15 lines
1362 bytes
Normally when a pointer is 'free'ed in unix, free function appends the memory
associated with the pointer to its internal free list and it doesn't return
it to the operating system. Thus the heap of a process at any given time
could be much more than what it is actually using during it's lifetime. Also
note that process heap size would never decrease during it's lifetime. This 
could lead to bad performance due to unnecessary swapping if there are lot of 
users (running the same application that uses lot of heap).
 
If there is a free block at the top of the process heap, it can be released to 
the OS (with sbrk(-size)). Free function can be modified to accomplish this, but
it would require different implementation of malloc library. Are there any good
algorithms to do this? Has anyone attempted this before?

Thanx,
Reddy
Technical Details
Message-ID: <3714@zorba.Tynan.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!mips!zorba!dtynan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!mips!zorba!dtynan
From: sreddy@oracle.UUCP (Sreenivas Reddy)
Newsgroups: comp.unix
Subject: Help on malloc library
Keywords: malloc, free, sbrk, heap, swap
Message-ID: <3714@zorba.Tynan.COM>
Date: 18 Jul 90 06:42:03 GMT
Sender: dtynan@zorba.Tynan.COM
Reply-To: mips!uunet!oracle!sreddy (Sreenivas Reddy)
Organization: Oracle Corporation, Belmont, CA
Lines: 15
Approved: dtynan@zorba.Tynan.COM