Implement a hook to allow us to reclaim the memory used by the first stage

of the bootstrap (the bit which loads /boot/loader).
This commit is contained in:
Doug Rabson 1998-10-19 09:08:40 +00:00
parent d7449e132f
commit 5a911c6263
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40520
2 changed files with 14 additions and 2 deletions

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: stand.h,v 1.6 1998/09/26 10:48:50 dfr Exp $
* $Id: stand.h,v 1.7 1998/10/06 19:23:57 msmith Exp $
* From $NetBSD: stand.h,v 1.22 1997/06/26 19:17:40 drochner Exp $
*/
@ -181,6 +181,9 @@ extern void *calloc(size_t n1, size_t n2);
extern void *realloc(void *ptr, size_t size);
extern void *reallocf(void *ptr, size_t size);
extern void mallocstats(void);
#ifdef __alpha__
extern void free_region(void *start, void *end);
#endif
/* disklabel support (undocumented, may be junk) */
struct disklabel;

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: zalloc_malloc.c,v 1.2 1998/09/26 10:48:50 dfr Exp $
* $Id: zalloc_malloc.c,v 1.3 1998/10/01 17:35:08 msmith Exp $
*/
/*
@ -49,6 +49,15 @@ void mallocstats(void);
#undef free
#endif
#ifdef __alpha__
void
free_region(void *start, void *end)
{
zextendPool(&MallocPool, start, (caddr_t)end - (caddr_t)start);
zfree(&MallocPool, start, (caddr_t)end - (caddr_t)start);
}
#endif
void *
malloc(size_t bytes)
{