Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ freemem(2) — Purdue Xinu

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getbuf(2)

getmem(2)

getstk(2)

freebuf(2)

freestk(2)

FREEMEM(2)

NAME

freemem − deallocate a block of heap memory

SYNOPSIS

int freemem(addr, len)
char ∗addr;
int len;

DESCRIPTION

Freemem deallocates a contiguous block of memory previously obtained with GETMEM(2), and returns it to the free list.  Argument addr specifies the lowest address of the block being deallocated, and argument len specifies the length of the block in bytes.  In this version, memory is allocated in  multiples of four bytes to guarantee that sufficient space is available in each block to link it onto the free list.  However, the length passed to both getmem and freemem is rounded automatically, so the user need not be aware of any extra space in the allocated block. 

SEE ALSO

getbuf(2), getmem(2), getstk(2), freebuf(2), freestk(2)

December 01, 1986  —  Xinu Programmer’s Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026