diff options
author | dfr <dfr@FreeBSD.org> | 1998-10-19 09:08:40 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-10-19 09:08:40 +0000 |
commit | 17c3d6ec9461b24d5a823534f752107e24759cf3 (patch) | |
tree | c91c51bea58491de4a1f7db8bf3e75da0f21582c /lib/libstand | |
parent | 96dd6d4fb6d20eb02e1a30a99c1608d132ae93d9 (diff) | |
download | FreeBSD-src-17c3d6ec9461b24d5a823534f752107e24759cf3.zip FreeBSD-src-17c3d6ec9461b24d5a823534f752107e24759cf3.tar.gz |
Implement a hook to allow us to reclaim the memory used by the first stage
of the bootstrap (the bit which loads /boot/loader).
Diffstat (limited to 'lib/libstand')
-rw-r--r-- | lib/libstand/stand.h | 5 | ||||
-rw-r--r-- | lib/libstand/zalloc_malloc.c | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h index 4199fd6..251e7e8 100644 --- a/lib/libstand/stand.h +++ b/lib/libstand/stand.h @@ -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; diff --git a/lib/libstand/zalloc_malloc.c b/lib/libstand/zalloc_malloc.c index 6cb4953..d70a8f7 100644 --- a/lib/libstand/zalloc_malloc.c +++ b/lib/libstand/zalloc_malloc.c @@ -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) { |