[comp.unix.questions] System V.3 malloc

ian@spider.co.uk (Ian Heavens) (10/30/90)

From: ian@redrump.spider.co.uk (Ian Heavens)
Newsgroups: info-unix@sem.brl.mil
Subject: System V.3 kernel malloc
References: 
Sender: 
Followup-To: 
Distribution: 
Organization: Spider Systems Limited, Edinburgh, UK.
Keywords: 

I am trying to allocate memory dynamically in the UNIX V.3.2 kernel
running on an 80386.

malloc() takes a 'struct map' structure and a size (in pages? bytes?)

e.g.:

malloc(sptmap, size)
struct map sptmap;
int size;

and there seem to be several different areas of memory, each corresponding
to a separate map structure.  sptmap is the system page table map,
which I think is the one I want.  There appears to be a higher level
interface to this, composed of sptalloc() and sptfree().  

(1) should I be using the sptmap, and if so, sptalloc?  What are the
semantics of the parameters to sptalloc?

(2) if not, what?

Please dont suggest using STREAMS buffers!  I am writing a package
to trace Streams messages (primarily to aid debugging of Streams
buffer leaks), and it would be too incestuous to do this.

Thanks

Ian Heavens


----------------------------
Ian Heavens	
Spider Systems Limited
Spider Park, Stanwell Street
Edinburgh, EH6 5NG, Scotland
+44 31 554 9424 (Ext 4166)

ian@spider.co.uk                 
ian%spider.co.uk@uunet.uu.net
----------------------------