/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
void _STUB_vmlast(){}
#else
#include "vmhdr.h"
/* Allocation with freeing and reallocing of last allocated block only.
**
** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
*/
#if __STD_C
#else
#endif
{
}
}
for(;;)
continue;
if(last)
}
goto got_block;
}
/* there is no usable free space in region, try extending */
goto got_block;
}
else goto done;
}
}
done:
}
#if __STD_C
#else
#endif
{
if(!data)
return 0;
return -1;
}
}
return -1;
}
}
return 0;
}
#if __STD_C
#else
int type;
#endif
{
if(!data)
{ oldsize = 0;
goto done;
}
if(size <= 0)
}
}
}
else
{ /* see if it was one of ours */
break;
}
}
/* set 's' to be the current available space */
s = -1;
}
else
oldsize = s;
else
}
}
{ if(s >= 0) /* amount to extend */
{ s += ds;
}
else goto do_alloc;
}
else
{ do_alloc:
else
}
else
}
}
/* new block and size */
}
}
}
}
if(data)
}
}
return data;
}
#if __STD_C
#else
#endif
{
return -1L;
return -1L;
}
#if __STD_C
#else
#endif
{
return -1L;
return -1L;
}
#if __STD_C
#else
static int lastcompact(vm)
#endif
{
return -1;
}
}
continue;
else s += sizeof(Head_t);
}
return 0;
}
#if __STD_C
#else
#endif
{
}
}
goto done;
/* find the segment containing this block */
break;
/* get a suitably aligned address */
/* free the unused tail */
}
done:
}
/* Public method for free-1 allocation */
{
};
#ifdef NoF
#endif
#endif