Deleted Added
full compact
34c34
< * $Id: kern_malloc.c,v 1.50 1999/01/08 17:31:09 eivind Exp $
---
> * $Id: kern_malloc.c,v 1.51 1999/01/10 01:58:24 eivind Exp $
104c104,113
< * Allocate a block of memory
---
> * malloc:
> *
> * Allocate a block of memory.
> *
> * If M_NOWAIT is set, this routine will not block and return NULL if
> * the allocation fails.
> *
> * If M_ASLEEP is set (M_NOWAIT must also be set), this routine
> * will have the side effect of calling asleep() if it returns NULL,
> * allowing the parent to await() at some future time.
125c134,141
< if (!type->ks_next)
---
> /*
> * Must be at splmem() prior to initializing segment to handle
> * potential initialization race.
> */
>
> s = splmem();
>
> if (!type->ks_next) {
126a143
> }
130c147
< s = splmem();
---
>
131a149,153
> if (flags & M_ASLEEP) {
> if (ksp->ks_limblocks < 65535)
> ksp->ks_limblocks++;
> asleep((caddr_t)ksp, PSWP+2, type->ks_shortdesc, 0);
> }
242c264,268
< * Free a block of memory allocated by malloc.
---
> * free:
> *
> * Free a block of memory allocated by malloc.
> *
> * This routine may not block.