Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sdi_free(D3I) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       sdi_free(D3I)                                          sdi_free(D3I)


       NAME
             sdi_free - return a previously allocated piece of memory back
             to the pool

       SYNOPSIS
             #include <sys/sdi.h>
             void sdi_free(struct head *headp, struct jpool *jp);

          Arguments
             headp Pointer to the head structure of the pool from which the
                   memory piece was allocated.

             jp    Pointer to the memory piece to be returned to the pool.

       DESCRIPTION
             sdi_free returns the allocated area of memory back to the pool
             it was taken from.  After the completion of the use of the
             memory, the target or HBA driver should return the memory to
             the pool, because the pool is shared between all target and
             HBA drivers.  Since each target driver and HBA driver needs
             large numbers of either job structures or SCSI command blocks,
             sdi_get(D3I) and sdi_free, facilitate sharing of kernel
             memory.  The routines allocate from and return memory to the
             kernel, based on demand.

          Return Values
             The normal return is SDI_RET_OK.  A return value of
             SDI_RET_ERR indicates an error with the pointer.

       USAGE
             sdi_free is typically used in a local freeblk/freejob routine.
             Rather than having a local pool of job or command structures,
             PDI drivers should use one of the two existing shared pools.
             If the size of structures in these pools is too small, a new
             pool can be created and used by a PDI driver.

             In SVR4.2 MP, the sdi_get and sdi_free routines do nothing
             more than call kmem_zalloc(D3) and kmem_free(D3).  The headp
             parameter is maintained simply to keep a record of the
             allocation size.

          Level
             Base or Interrupt.





                           Copyright 1994 Novell, Inc.               Page 1













      sdi_free(D3I)                                          sdi_free(D3I)


      REFERENCES
            kmem_free(D3), kmem_zalloc(D3), sdi_get(D3I)

      NOTICES
         Applicability
            sdi: 1, 2










































                          Copyright 1994 Novell, Inc.               Page 2








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