/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* 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
int local;
#endif
{
size_t s;
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
int local;
#endif
{
size_t s;
if(!data)
return 0;
else
}
}
return data ? 0 : -1;
}
#if __STD_C
#else
int type;
int local;
#endif
{
if(!data)
return data;
}
if(size <= 0)
}
else
{ /* see if it was one of ours */
break;
goto done;
}
}
/* 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
int local;
#endif
{
long offset;
offset = -1L;
return offset;
}
#if __STD_C
#else
int local;
#endif
{
long size;
size = -1L;
return size;
}
#if __STD_C
#else
int local;
#endif
{
ssize_t s;
continue;
else s += sizeof(Head_t);
}
return 0;
}
#if __STD_C
#else
int local;
#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